Skip to content

Instantly share code, notes, and snippets.

@benpye

benpye/samba.nix Secret

Created June 21, 2018 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benpye/2345a2de081bdea5a87d6368bd07ec9d to your computer and use it in GitHub Desktop.
Save benpye/2345a2de081bdea5a87d6368bd07ec9d to your computer and use it in GitHub Desktop.
services.samba = {
enable = true;
securityType = "share";
extraConfig =''
workgroup = WORKGROUP
server string = nixos
netbios name = nixos
security = share
hosts allow = 192.168 localhost
hosts deny = 0.0.0.0/0
guest account = nobody
map to guest = bad user
'';
shares = {
library = {
path = "/mnt/pool/library";
browseable = "yes";
"read only" = "no";
"guest ok" = "yes";
"force user" = "nobody";
"force group" = "nogroup";
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment