diff options
author | makefu <github@syntax-fehler.de> | 2017-03-24 13:00:22 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-03-24 13:00:22 +0100 |
commit | 8eb9bde68a5d2b3bfcc6086b8bc18588c1017448 (patch) | |
tree | 5db6c8b93387dd157f7939ecd6afea8c779eb764 /shared/2configs/share-shack.nix | |
parent | 679a03403f0b5152c091f23c4dc1b94625f5771b (diff) |
s 1 wolf: share directory
Diffstat (limited to 'shared/2configs/share-shack.nix')
-rw-r--r-- | shared/2configs/share-shack.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/shared/2configs/share-shack.nix b/shared/2configs/share-shack.nix new file mode 100644 index 000000000..247b9ee7d --- /dev/null +++ b/shared/2configs/share-shack.nix @@ -0,0 +1,38 @@ +{config, ... }:{ + users.users.smbguest = { + name = "smbguest"; + uid = config.ids.uids.smbguest; + group = "share"; + description = "smb guest user"; + home = "/home/share"; + createHome = true; + }; + + networking.firewall.allowedTCPPorts = [ + 139 445 # samba + ]; + + networking.firewall.allowedUDPPorts = [ + 137 138 + ]; + services.samba = { + enable = true; + shares = { + share-home = { + path = "/home/share/"; + "read only" = "no"; + browseable = "yes"; + "guest ok" = "yes"; + }; + }; + extraConfig = '' + guest account = smbguest + map to guest = bad user + # disable printing + load printers = no + printing = bsd + printcap name = /dev/null + disable spoolss = yes + ''; + }; +} |