@@ -5,8 +5,8 @@ with lib;
55let
66 cfg = config.services.tarsnap;
77
8− configFile = name: cfg: ''
9− cachedir ${config.services.tarsnap.cachedir}/${name}
8+ configFile = cfg: ''
9+ cachedir ${config.services.tarsnap.cachedir}
1010 keyfile ${config.services.tarsnap.keyfile}
1111 ${optionalString cfg.nodump "nodump"}
1212 ${optionalString cfg.printStats "print-stats"}
@@ -57,12 +57,6 @@ in
5757 will refuse to run until you manually rebuild the cache with
5858 <command>tarsnap --fsck</command>.
5959
60− Note that each individual archive (specified below) has its own cache
61− directory specified under <literal>cachedir</literal>; this is because
62− tarsnap locks the cache during backups, meaning multiple services
63− archives cannot be backed up concurrently or overlap with a shared
64− cache.
65−
6660 Set to <literal>null</literal> to disable caching.
6761 '';
6862 };
@@ -257,7 +251,6 @@ in
257251 mkdir -p -m 0700 ${cfg.cachedir}
258252 chown root:root ${cfg.cachedir}
259253 chmod 0700 ${cfg.cachedir}
260− mkdir -p -m 0700 ${cfg.cachedir}/$1
261254 DIRS=`cat /etc/tarsnap/$1.dirs`
262255 exec tarsnap --configfile /etc/tarsnap/$1.conf -c -f $1-$(date +"%Y%m%d%H%M%S") $DIRS
263256 '';
@@ -276,7 +269,7 @@ in
276269
277270 environment.etc =
278271 (mapAttrs' (name: cfg: nameValuePair "tarsnap/${name}.conf"
279− { text = configFile name cfg;
272+ { text = configFile cfg;
280273 }) cfg.archives) //
281274 (mapAttrs' (name: cfg: nameValuePair "tarsnap/${name}.dirs"
282275 { text = concatStringsSep " " cfg.directories;