diff options
-rw-r--r-- | hosts/common/nas.nix | 7 | ||||
-rw-r--r-- | hosts/common/server/samba.nix | 27 |
2 files changed, 34 insertions, 0 deletions
diff --git a/hosts/common/nas.nix b/hosts/common/nas.nix new file mode 100644 index 0000000..09dd5e7 --- /dev/null +++ b/hosts/common/nas.nix @@ -0,0 +1,7 @@ +{ config, pkgs, lib, ... }: + +{ + imports = [ + ./server/samba.nix + ]; +} 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"; + }; + }; + }; +} |