Merge pull request #107957 from tex/nixos/auto-upgrade
nixos/auto-upgrade: add persistent option
This commit is contained in:
commit
99b20f5580
|
@ -1642,6 +1642,14 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The auto-upgrade service now accepts persistent (default:
|
||||||
|
true) parameter. By default auto-upgrade will now run
|
||||||
|
immediately if it would have been triggered at least once
|
||||||
|
during the time when the timer was inactive.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
If you are using Wayland you can choose to use the Ozone
|
If you are using Wayland you can choose to use the Ozone
|
||||||
|
|
|
@ -597,6 +597,10 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||||
- Support for older versions of hadoop have been added to the module
|
- Support for older versions of hadoop have been added to the module
|
||||||
- Overriding and extending site XML files has been made easier
|
- Overriding and extending site XML files has been made easier
|
||||||
|
|
||||||
|
- The auto-upgrade service now accepts persistent (default: true) parameter.
|
||||||
|
By default auto-upgrade will now run immediately if it would have been triggered at least
|
||||||
|
once during the time when the timer was inactive.
|
||||||
|
|
||||||
- If you are using Wayland you can choose to use the Ozone Wayland support
|
- If you are using Wayland you can choose to use the Ozone Wayland support
|
||||||
in Chrome and several Electron apps by setting the environment variable
|
in Chrome and several Electron apps by setting the environment variable
|
||||||
`NIXOS_OZONE_WL=1` (for example via
|
`NIXOS_OZONE_WL=1` (for example via
|
||||||
|
|
|
@ -63,13 +63,16 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
dates = mkOption {
|
dates = mkOption {
|
||||||
default = "04:40";
|
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
default = "04:40";
|
||||||
|
example = "daily";
|
||||||
description = ''
|
description = ''
|
||||||
Specification (in the format described by
|
How often or when upgrade occurs. For most desktop and server systems
|
||||||
|
a sufficient upgrade frequency is once a day.
|
||||||
|
|
||||||
|
The format is described in
|
||||||
<citerefentry><refentrytitle>systemd.time</refentrytitle>
|
<citerefentry><refentrytitle>systemd.time</refentrytitle>
|
||||||
<manvolnum>7</manvolnum></citerefentry>) of the time at
|
<manvolnum>7</manvolnum></citerefentry>.
|
||||||
which the update will occur.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -123,6 +126,22 @@ in {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
persistent = mkOption {
|
||||||
|
default = true;
|
||||||
|
type = types.bool;
|
||||||
|
example = false;
|
||||||
|
description = ''
|
||||||
|
Takes a boolean argument. If true, the time when the service
|
||||||
|
unit was last triggered is stored on disk. When the timer is
|
||||||
|
activated, the service unit is triggered immediately if it
|
||||||
|
would have been triggered at least once during the time when
|
||||||
|
the timer was inactive. Such triggering is nonetheless
|
||||||
|
subject to the delay imposed by RandomizedDelaySec=. This is
|
||||||
|
useful to catch up on missed runs of the service when the
|
||||||
|
system was powered down.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -217,11 +236,17 @@ in {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
startAt = cfg.dates;
|
startAt = cfg.dates;
|
||||||
|
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.timers.nixos-upgrade.timerConfig.RandomizedDelaySec =
|
systemd.timers.nixos-upgrade = {
|
||||||
cfg.randomizedDelaySec;
|
timerConfig = {
|
||||||
|
RandomizedDelaySec = cfg.randomizedDelaySec;
|
||||||
|
Persistent = cfg.persistent;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue