From 37e39d66cb3deabd0901f3668b2215663a1a941a Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 27 Feb 2022 13:19:16 -0800 Subject: NAS: initial configuration For now we only want samba on it. --- hosts/common/nas.nix | 7 +++++++ hosts/common/server/samba.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 hosts/common/nas.nix create mode 100644 hosts/common/server/samba.nix (limited to 'hosts/common') 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"; + }; + }; + }; +} -- cgit 1.4.1