From 79c02ce986eb668fdee1338ef505dc84328aa780 Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 31 Mar 2024 02:00:20 -0400 Subject: [PATCH] nas0: hmm --- nixos/hosts/nas0/.target | 1 + nixos/hosts/nas0/default.nix | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 nixos/hosts/nas0/.target diff --git a/nixos/hosts/nas0/.target b/nixos/hosts/nas0/.target new file mode 100644 index 0000000..fe84fbf --- /dev/null +++ b/nixos/hosts/nas0/.target @@ -0,0 +1 @@ +nas0.hoki-porgy.ts.net diff --git a/nixos/hosts/nas0/default.nix b/nixos/hosts/nas0/default.nix index 0929133..91f4ef1 100644 --- a/nixos/hosts/nas0/default.nix +++ b/nixos/hosts/nas0/default.nix @@ -22,6 +22,7 @@ services.samba = { enable = true; + package = pkgs.samba4Full; securityType = "user"; openFirewall = true; extraConfig = '' @@ -31,13 +32,13 @@ netbios name = nas0 hosts allow = 10.0.0.0/8 100.64.0.0/10 127.0.0.1 localhost hosts deny = 0.0.0.0/0 - guest account = nobody - map to guest = bad user + server smb encrypt = required + server min protocol = SMB3_00 ''; shares."main" = { path = "/mnt/storage/main"; browseable = "yes"; - "read only" = "no"; + writable = "true"; "guest ok" = "no"; "create mask" = "0644"; "directory mask" = "0755"; @@ -51,4 +52,32 @@ enable = true; openFirewall = true; }; + + # mDNS advertisement + services.avahi = { + enable = true; + openFirewall = true; + nssmdns = true; + publish = { + enable = true; + addresses = true; + domain = true; + hinfo = true; + userServices = true; + workstation = true; + }; + extraServiceFiles = { + smb = '' + + + + %h + + _smb._tcp + 445 + + + ''; + }; + }; }