about summary refs log tree commit diff
path: root/hosts/common/server
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-02-27 13:19:16 -0800
committerFranck Cuny <franck@fcuny.net>2022-02-27 13:19:16 -0800
commit37e39d66cb3deabd0901f3668b2215663a1a941a (patch)
tree5c88c40bf906381cf7b902018b76210763d03057 /hosts/common/server
parenthardware: enable btrfs scrubber and fstrimmer (diff)
downloadworld-37e39d66cb3deabd0901f3668b2215663a1a941a.tar.gz
NAS: initial configuration
For now we only want samba on it.
Diffstat (limited to 'hosts/common/server')
-rw-r--r--hosts/common/server/samba.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/hosts/common/server/samba.nix b/hosts/common/server/samba.nix
new file mode 100644
index 0000000..212f7ff
--- /dev/null
+++ b/hosts/common/server/samba.nix
@@ -0,0 +1,27 @@
+{ config, pkgs, lib, ... }:
+
+{
+  services.samba = {
+    enable = true;
+    securityType = "user";
+    extraConfig = ''
+      workgroup = WORKGROUP
+      server string = tahoe
+      netbios name = tahoe
+      security = user
+      hosts allow = 10.77  192.168.0 127.
+      guest account = nobody
+      map to guest = bad user
+      ntlm auth = true
+      signing_required = no
+    '';
+    shares = {
+      public = {
+        path = "/data/media/music";
+        browseable = "yes";
+        "read only" = "yes";
+        "guest ok" = "yes";
+      };
+    };
+  };
+}