nixos autoUpgrade: add a 'dates' option
(cherry picked from commit 80917d2473d321d7a990cf991c6353547976638c) Originally merged #11808 to release-15.09 directly. Close #11821.
This commit is contained in:
parent
b3b7f9f37f
commit
af6732e503
|
@ -42,6 +42,17 @@ let cfg = config.system.autoUpgrade; in
|
|||
'';
|
||||
};
|
||||
|
||||
dates = mkOption {
|
||||
default = "04:40";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Specification (in the format described by
|
||||
<citerefentry><refentrytitle>systemd.time</refentrytitle>
|
||||
<manvolnum>5</manvolnum></citerefentry>) of the time at
|
||||
which the update will occur.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -73,7 +84,7 @@ let cfg = config.system.autoUpgrade; in
|
|||
${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch ${toString cfg.flags}
|
||||
'';
|
||||
|
||||
startAt = mkIf cfg.enable "04:40";
|
||||
startAt = optionalString cfg.enable cfg.dates;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue