summaryrefslogtreecommitdiffstats
path: root/shared/2configs
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-03-26 01:41:26 +0100
committerlassulus <lass@lassul.us>2017-03-26 01:41:26 +0100
commit3d46b5b9e667d6e740b397efe8a2d2a7cea9bdc1 (patch)
tree2b743f79e839c34de5965e2bb5071ea6e971ca00 /shared/2configs
parente34d584feec9d123cc2fd8d3db417ede2b1bc437 (diff)
parent79737faaa693ee775f1b3e99ebb33a9729d95f9f (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'shared/2configs')
-rw-r--r--shared/2configs/share-shack.nix38
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
+ '';
+ };
+}