summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/backup.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/3modules/backup.nix')
-rw-r--r--krebs/3modules/backup.nix8
1 files changed, 5 insertions, 3 deletions
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