diff options
Diffstat (limited to 'modules/snorlax/samba.nix')
-rw-r--r-- | modules/snorlax/samba.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/modules/snorlax/samba.nix b/modules/snorlax/samba.nix new file mode 100644 index 0000000..44a4be9 --- /dev/null +++ b/modules/snorlax/samba.nix @@ -0,0 +1,37 @@ +{ ... }: +{ + services.samba = { + enable = true; + securityType = "user"; + openFirewall = true; + settings = { + global = { + "workgroup" = "WORKGROUP"; + "server string" = "smbnix"; + "netbios name" = "smbnix"; + "security" = "user"; + "hosts allow" = "192.168.50. 127.0.0.1 localhost"; + "hosts deny" = "0.0.0.0/0"; + "guest account" = "nobody"; + "map to guest" = "bad user"; + }; + + photos = { + "path" = "/srv/samba/photos"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "yes"; + "create mask" = "0644"; + "directory mask" = "0755"; + "force user" = "nobody"; + "force group" = "nogroup"; + }; + }; + }; + + # Used to advertise to Windows hosts + services.samba-wsdd = { + enable = true; + openFirewall = true; + }; +} |