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 | 6fb850bdafafd70150684faf47d2cac50a6a09c2 (patch) | |
tree | 22fa9dde804ccd19269cb87b886f033287ba2ac7 | |
parent | c5d28a2b30d1c4ef822f2d8475713307372bb343 (diff) | |
parent | a4b524e902c9408b59ab678820121d3cfafd2aad (diff) |
Merge remote-tracking branch 'prism/makefu'
-rw-r--r-- | shared/1systems/wolf.nix | 1 | ||||
-rw-r--r-- | shared/2configs/share-shack.nix | 38 |
2 files changed, 39 insertions, 0 deletions
diff --git a/shared/1systems/wolf.nix b/shared/1systems/wolf.nix index b0b8227..722a088 100644 --- a/shared/1systems/wolf.nix +++ b/shared/1systems/wolf.nix @@ -15,6 +15,7 @@ in ../2configs/cgit-mirror.nix ../2configs/repo-sync.nix ../2configs/graphite.nix + ../2configs/share-shack.nix ]; # use your own binary cache, fallback use cache.nixos.org (which is used by # apt-cacher-ng in first place) diff --git a/shared/2configs/share-shack.nix b/shared/2configs/share-shack.nix new file mode 100644 index 0000000..247b9ee --- /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 + ''; + }; +} |