summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/backup.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-03-15 15:59:05 +0100
committertv <tv@krebsco.de>2016-03-15 15:59:05 +0100
commit13df24f8f09469c32077ded463d99033042e25ee (patch)
treeabbf245d307ca7cc8d82e72b7cc40314d9578577 /krebs/3modules/backup.nix
parente3f0ca7137b8b94c87f008c200fecb4042a7ec38 (diff)
krebs.backup: use krebs.on-failure
Diffstat (limited to 'krebs/3modules/backup.nix')
-rw-r--r--krebs/3modules/backup.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix
index 97082f56a..d22dd3810 100644
--- a/krebs/3modules/backup.nix
+++ b/krebs/3modules/backup.nix
@@ -60,6 +60,12 @@ let
};
imp = {
+ krebs.on-failure.plans =
+ listToAttrs (map (plan: nameValuePair "backup.${plan.name}" {
+ }) (filter (plan: build-host-is "pull" "dst" plan ||
+ build-host-is "push" "src" plan)
+ enabled-plans));
+
systemd.services =
listToAttrs (map (plan: nameValuePair "backup.${plan.name}" {
# TODO if there is plan.user, then use its privkey