diff options
author | tv <tv@krebsco.de> | 2016-02-07 16:08:07 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-02-07 16:08:07 +0100 |
commit | 00525dc0ef2b73e6d883eb6e7358a616b8c15b69 (patch) | |
tree | d5a8d815eedcec364a1828b3e572ca36b8ebd559 /krebs | |
parent | 4c40eba8161d4afaa85984737c6f03adf861be7a (diff) |
krebs.backup.plans.*.startAt: null disables timer
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/3modules/backup.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix index d50628073..881e126f6 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 |