+56
hosts/valefar/default.nix
+56
hosts/valefar/default.nix
···
149
149
"d /storage/immich 0755 immich immich -"
150
150
"d /storage/immich/photos 0755 immich immich -"
151
151
"Z /storage/immich 0755 immich immich -"
152
+
"d /storage/tm_share 0755 regent users"
152
153
];
153
154
154
155
# =============================================================================
···
161
162
'';
162
163
};
163
164
165
+
services.samba = {
166
+
enable = true;
167
+
settings = {
168
+
global = {
169
+
"workgroup" = "WORKGROUP";
170
+
"server string" = "valefar";
171
+
"netbios name" = "valefar";
172
+
"security" = "user";
173
+
174
+
"hosts allow" = "100.64.0.0/10 10.0.0.0/24 127.0.0.1 localhost";
175
+
"hosts deny" = "0.0.0.0/0";
176
+
"guest account" = "nobody";
177
+
"map to guest" = "bad user";
178
+
};
179
+
180
+
"tm_share" = {
181
+
"path" = tmPath;
182
+
"valid users" = regent;
183
+
"public" = "yes";
184
+
"writeable" = "yes";
185
+
"force user" = regent;
186
+
"fruit:aapl" = "yes";
187
+
"fruit:time machine" = "yes";
188
+
"vfs objects" = "catia fruit streams_xattr";
189
+
};
190
+
};
191
+
};
192
+
164
193
services.netatalk = {
165
194
enable = true;
166
195
settings = {
···
178
207
publish = {
179
208
enable = true;
180
209
userServices = true;
210
+
};
211
+
212
+
extraServiceFiles = {
213
+
timemachine = ''
214
+
<?xml version="1.0" standalone='no'?>
215
+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
216
+
<service-group>
217
+
<name replace-wildcards="yes">%h</name>
218
+
<service>
219
+
<type>_smb._tcp</type>
220
+
<port>445</port>
221
+
</service>
222
+
<service>
223
+
<type>_device-info._tcp</type>
224
+
<port>0</port>
225
+
<txt-record>model=TimeCapsule8,119</txt-record>
226
+
</service>
227
+
<service>
228
+
<type>_adisk._tcp</type>
229
+
<!--
230
+
change tm_share to share name, if you changed it.
231
+
-->
232
+
<txt-record>dk0=adVN=tm_share,adVF=0x82</txt-record>
233
+
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
234
+
</service>
235
+
</service-group>
236
+
'';
181
237
};
182
238
};
183
239