From 1b6221d30597f796377530939093d0f4af625a29 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 17 Dec 2017 14:39:40 +0100 Subject: =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom/borgbackup.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom/borgbackup.nix b/custom/borgbackup.nix index 781f094a..95b3ce24 100644 --- a/custom/borgbackup.nix +++ b/custom/borgbackup.nix @@ -59,14 +59,13 @@ in { config = mkIf (any (t: t.paths != []) (attrValues cfg.targets)) { services.btrfs-snapshots.enable = mkIf (cfg.snapshots == "btrfs") true; - systemd.timers = (listToAttrs (map ({ target, path, tCfg }: nameValuePair "borgbackup-${target}-${path}" { + systemd.timers = (listToAttrs (map ({ target, path, tCfg }: nameValuePair "borgbackup-${target}@${path}" { wantedBy = [ "timers.target" ]; timerConfig = { Persistent = false; OnBootSec = tCfg.interval; OnUnitInactiveSec = tCfg.interval; - Unit = "borgbackup-${target}@${path}.service"; }; }) (flatten (mapAttrsToList (target: tCfg: map (path: { inherit target path tCfg; }) tCfg.paths) cfg.targets)))) // (mapAttrs' (target: tCfg: nameValuePair "borgbackup-prune-${target}" { wantedBy = [ "timers.target" ]; -- cgit v1.2.3