diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-12-17 14:39:40 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-12-17 14:39:40 +0100 |
commit | 1b6221d30597f796377530939093d0f4af625a29 (patch) | |
tree | b450e69a6fb2263e6e6d58d7db92a0a0aeba54a8 | |
parent | 55124b11e02da39ba71d97c8c6d3c0e27d595864 (diff) | |
download | nixos-1b6221d30597f796377530939093d0f4af625a29.tar nixos-1b6221d30597f796377530939093d0f4af625a29.tar.gz nixos-1b6221d30597f796377530939093d0f4af625a29.tar.bz2 nixos-1b6221d30597f796377530939093d0f4af625a29.tar.xz nixos-1b6221d30597f796377530939093d0f4af625a29.zip |
…
-rw-r--r-- | custom/borgbackup.nix | 3 |
1 files changed, 1 insertions, 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 { | |||
59 | config = mkIf (any (t: t.paths != []) (attrValues cfg.targets)) { | 59 | config = mkIf (any (t: t.paths != []) (attrValues cfg.targets)) { |
60 | services.btrfs-snapshots.enable = mkIf (cfg.snapshots == "btrfs") true; | 60 | services.btrfs-snapshots.enable = mkIf (cfg.snapshots == "btrfs") true; |
61 | 61 | ||
62 | systemd.timers = (listToAttrs (map ({ target, path, tCfg }: nameValuePair "borgbackup-${target}-${path}" { | 62 | systemd.timers = (listToAttrs (map ({ target, path, tCfg }: nameValuePair "borgbackup-${target}@${path}" { |
63 | wantedBy = [ "timers.target" ]; | 63 | wantedBy = [ "timers.target" ]; |
64 | 64 | ||
65 | timerConfig = { | 65 | timerConfig = { |
66 | Persistent = false; | 66 | Persistent = false; |
67 | OnBootSec = tCfg.interval; | 67 | OnBootSec = tCfg.interval; |
68 | OnUnitInactiveSec = tCfg.interval; | 68 | OnUnitInactiveSec = tCfg.interval; |
69 | Unit = "borgbackup-${target}@${path}.service"; | ||
70 | }; | 69 | }; |
71 | }) (flatten (mapAttrsToList (target: tCfg: map (path: { inherit target path tCfg; }) tCfg.paths) cfg.targets)))) // (mapAttrs' (target: tCfg: nameValuePair "borgbackup-prune-${target}" { | 70 | }) (flatten (mapAttrsToList (target: tCfg: map (path: { inherit target path tCfg; }) tCfg.paths) cfg.targets)))) // (mapAttrs' (target: tCfg: nameValuePair "borgbackup-prune-${target}" { |
72 | wantedBy = [ "timers.target" ]; | 71 | wantedBy = [ "timers.target" ]; |