From 00525dc0ef2b73e6d883eb6e7358a616b8c15b69 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 7 Feb 2016 16:08:07 +0100 Subject: krebs.backup.plans.*.startAt: null disables timer --- krebs/3modules/backup.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'krebs/3modules/backup.nix') diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix index d5062807..881e126f 100644 --- a/krebs/3modules/backup.nix +++ b/krebs/3modules/backup.nix @@ -30,7 +30,7 @@ let }; startAt = mkOption { default = "hourly"; - type = types.str; # TODO systemd.time(7)'s calendar event + type = with types; nullOr str; # TODO systemd.time(7)'s calendar event }; snapshots = mkOption { default = { @@ -115,7 +115,8 @@ let ExecStart = push plan; Type = "oneshot"; }; - startAt = plan.startAt; + } // optionalAttrs (plan.startAt != null) { + inherit (plan) startAt; }; makePullService = plan: assert isPullDst plan; { @@ -124,7 +125,8 @@ let ExecStart = pull plan; Type = "oneshot"; }; - startAt = plan.startAt; + } // optionalAttrs (plan.startAt != null) { + inherit (plan) startAt; }; push = plan: let -- cgit v1.2.3