diff --git a/hosts/youko/nas.nix b/hosts/youko/nas.nix index 291cdff..9017b8b 100644 --- a/hosts/youko/nas.nix +++ b/hosts/youko/nas.nix @@ -8,7 +8,6 @@ boot = { supportedFilesystems = [ "zfs" ]; zfs.extraPools = [ "yottapool" ]; - }; services.zfs = { @@ -26,4 +25,67 @@ ZED_SCRUB_AFTER_RESILVER = true; }; }; + + services.samba-wsdd = { + enable = true; + openFirewall = true; + }; + + # TODO: Clean up. Potentially make it a separate module + services.avahi = { + publish.enable = true; + publish.userServices = true; + nssmdns4 = true; + enable = true; + openFirewall = true; + extraServiceFiles = { + timemachine = '' + + + + %h + + _smb._tcp + 445 + + + _device-info._tcp + 0 + model=TimeCapsule8,119 + + + _adisk._tcp + dk0=adVN=tm_share,adVF=0x82 + sys=waMa=0,adVF=0x100 + + + ''; + }; + }; + + services.samba = { + enable = true; + openFirewall = true; + settings = { + global = { + "workgroup" = "WORKGROUP"; + "hosts allow" = "0.0.0.0/0"; + "guest account" = "nobody"; + "map to guest" = "bad user"; + "getwd cache" = "true"; + "strict sync" = "no"; + "use sendfile" = "true"; + }; + "tm_share" = { + "path" = "/media/data/tm_share"; + "valid users" = "niko"; + "public" = "no"; + "writeable" = "yes"; + "force user" = "niko"; + "fruit:aapl" = "yes"; + "fruit:time machine" = "yes"; + "vfs objects" = "catia fruit streams_xattr"; + }; + }; + }; }