diff options
author | Franck Cuny <franck@fcuny.net> | 2022-02-27 13:19:16 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-02-27 13:19:16 -0800 |
commit | 37e39d66cb3deabd0901f3668b2215663a1a941a (patch) | |
tree | 5c88c40bf906381cf7b902018b76210763d03057 /hosts/common | |
parent | hardware: enable btrfs scrubber and fstrimmer (diff) | |
download | world-37e39d66cb3deabd0901f3668b2215663a1a941a.tar.gz |
NAS: initial configuration
For now we only want samba on it.
Diffstat (limited to 'hosts/common')
-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"; + }; + }; + }; +} |