@@ -238,6 +238,20 @@ in
238238 Whether to produce verbose logging output.
239239 '';
240240 };
241+ explicitSymlinks = mkOption {
242+ type = types.bool;
243+ default = false;
244+ description = ''
245+ Whether to follow symlinks specified as archives.
246+ '';
247+ };
248+ followSymlinks = mkOption {
249+ type = types.bool;
250+ default = false;
251+ description = ''
252+ Whether to follow all symlinks in archive trees.
253+ '';
254+ };
241255 };
242256 }
243257 ));
@@ -304,6 +318,8 @@ in
304318 let run = ''tarsnap --configfile "/etc/tarsnap/${name}.conf" \
305319 -c -f "${name}-$(date +"%Y%m%d%H%M%S")" \
306320 ${optionalString cfg.verbose "-v"} \
321+ ${optionalString cfg.explicitSymlinks "-H"} \
322+ ${optionalString cfg.followSymlinks "-L"} \
307323 ${concatStringsSep " " cfg.directories}'';
308324 in if (cfg.cachedir != null) then ''
309325 mkdir -p ${cfg.cachedir}