Skip to content

Instantly share code, notes, and snippets.

@bahrom04
Last active January 20, 2026 12:02
Show Gist options
  • Select an option

  • Save bahrom04/dc36db27da4fe6c7c149eb5d9699e782 to your computer and use it in GitHub Desktop.

Select an option

Save bahrom04/dc36db27da4fe6c7c149eb5d9699e782 to your computer and use it in GitHub Desktop.
Addding samba file sharing in NixOS
{...}: {
services = {
samba = {
enable = true;
package = pkgs.samba4Full;
openFirewall = true;
settings = {
global = {
"server smb encrypt" = "required";
"server min protocol" = "SMB3_00";
"workgroup" = "WORKGROUP";
"security" = "user";
};
testshare = {
"path" = "/home/bahrom/Public";
"writable" = "yes";
"comment" = "Hello World!";
"browseable" = "yes";
};
};
};
samba-wsdd = {
enable = true;
openFirewall = true;
};
avahi = {
enable = true;
publish.enable = true;
publish.userServices = true;
openFirewall = true;
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment