diff options
author | lassulus <lass@lassul.us> | 2017-06-01 12:49:36 +0200 |
---|---|---|
committer | lassulus <lass@lassul.us> | 2017-06-01 12:49:36 +0200 |
commit | e50bc4f3eb3dac13bba4ae6158e839a52455c3c3 (patch) | |
tree | b3c1fc1f3e00312e92e4ab747c31839db665eebd /shared/2configs/shack/share.nix | |
parent | 73b073c3fe037f31e05828a1071c9b4b19f7a2ff (diff) | |
parent | 9e04d0132133840fba14aca194f18925e3f353d5 (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'shared/2configs/shack/share.nix')
-rw-r--r-- | shared/2configs/shack/share.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/shared/2configs/shack/share.nix b/shared/2configs/shack/share.nix new file mode 100644 index 000000000..247b9ee7d --- /dev/null +++ b/shared/2configs/shack/share.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 + ''; + }; +} |