diff options
author | tv <tv@krebsco.de> | 2017-04-12 09:24:46 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2017-04-12 09:24:46 +0200 |
commit | 0248fce6be6705de4a6beab0f2a9336550df9d18 (patch) | |
tree | 6865e194d5df1f9f77a03da06192d5034f97cacf /shared/2configs | |
parent | 75f43655d379a7aeed58b9cb423759b8a3696a9a (diff) | |
parent | 9224e9c4c8432ce8d7788592b9d25cfc29440ee6 (diff) |
Merge remote-tracking branch 'prism/makefu'
Diffstat (limited to 'shared/2configs')
-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 + ''; + }; +} |