anchor.diff:  let
     cfg = config.services.tarsnap;
   
  -  configFile = cfg: ''
  -    cachedir ${config.services.tarsnap.cachedir}
  +  configFile = name: cfg: ''
  +    cachedir ${config.services.tarsnap.cachedir}/${name}
       keyfile  ${config.services.tarsnap.keyfile}
       ${optionalString cfg.nodump "nodump"}
       ${optionalString cfg.printStats "print-stats"}
  
positive.code: 
      environment.etc =
        (mapAttrs' (name: cfg: nameValuePair "tarsnap/${name}.conf"
          { text = configFile cfg;
          }) cfg.archives) //
        (mapAttrs' (name: cfg: nameValuePair "tarsnap/${name}.dirs"
          { text = concatStringsSep " " cfg.directories;
  
negative.code:         mkdir -p -m 0700 ${cfg.cachedir}
          chown root:root ${cfg.cachedir}
          chmod 0700 ${cfg.cachedir}
          mkdir -p -m 0700 ${cfg.cachedir}/$1
          DIRS=`cat /etc/tarsnap/$1.dirs`
          exec tarsnap --configfile /etc/tarsnap/$1.conf -c -f $1-$(date +"%Y%m%d%H%M%S") $DIRS
        '';
  