diff --git a/hosts/valefar/default.nix b/hosts/valefar/default.nix index 964b5ba..a527aaf 100755 --- a/hosts/valefar/default.nix +++ b/hosts/valefar/default.nix @@ -149,6 +149,7 @@ "d /storage/immich 0755 immich immich -" "d /storage/immich/photos 0755 immich immich -" "Z /storage/immich 0755 immich immich -" + "d /storage/tm_share 0755 regent users" ]; # ============================================================================= @@ -161,6 +162,34 @@ ''; }; + services.samba = { + enable = true; + settings = { + global = { + "workgroup" = "WORKGROUP"; + "server string" = "valefar"; + "netbios name" = "valefar"; + "security" = "user"; + + "hosts allow" = "100.64.0.0/10 10.0.0.0/24 127.0.0.1 localhost"; + "hosts deny" = "0.0.0.0/0"; + "guest account" = "nobody"; + "map to guest" = "bad user"; + }; + + "tm_share" = { + "path" = tmPath; + "valid users" = regent; + "public" = "yes"; + "writeable" = "yes"; + "force user" = regent; + "fruit:aapl" = "yes"; + "fruit:time machine" = "yes"; + "vfs objects" = "catia fruit streams_xattr"; + }; + }; + }; + services.netatalk = { enable = true; settings = { @@ -179,6 +208,33 @@ enable = true; userServices = 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 + + + ''; + }; }; # =============================================================================