summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-04-12 09:24:46 +0200
committertv <tv@krebsco.de>2017-04-12 09:24:46 +0200
commit0248fce6be6705de4a6beab0f2a9336550df9d18 (patch)
tree6865e194d5df1f9f77a03da06192d5034f97cacf /shared
parent75f43655d379a7aeed58b9cb423759b8a3696a9a (diff)
parent9224e9c4c8432ce8d7788592b9d25cfc29440ee6 (diff)
Merge remote-tracking branch 'prism/makefu'
Diffstat (limited to 'shared')
-rw-r--r--shared/1systems/wolf.nix1
-rw-r--r--shared/2configs/share-shack.nix38
2 files changed, 39 insertions, 0 deletions
diff --git a/shared/1systems/wolf.nix b/shared/1systems/wolf.nix
index b0b822780..722a08812 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 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
+ '';
+ };
+}