Sysupdate
systemd.sysupdate.enable
Atomically update the host OS, container images, portable service images or other sources.
If enabled, updates are triggered in regular intervals via a
systemd.timer
unit.
Please see https://www.freedesktop.org/software/systemd/man/systemd-sysupdate.html for more details.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/sysupdate.nix
systemd.sysupdate.reboot.enable
Whether to automatically reboot after an update.
If set to true
, the system will automatically reboot via a
systemd.timer
unit but only after a new version was installed.
This uses a unit completely separate from the one performing the update because it is typically advisable to download updates regularly while the system is up, but delay reboots until the appropriate time (i.e. typically at night).
Set this to false
if you do not want to reboot after an update. This
is useful when you update a container image or another source where
rebooting is not necessary in order to finalize the update.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/sysupdate.nix
systemd.sysupdate.reboot.timerConfig
The timer configuration for rebooting after an update.
By default, the upstream configuration is used: https://github.com/systemd/systemd/blob/main/units/systemd-sysupdate-reboot.timer
Type: attribute set of (systemd option)
Default
{ }
Example
{OnCalendar = "Sun 14:00:00";Unit = "foo.service";}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/sysupdate.nix
systemd.sysupdate.timerConfig
The timer configuration for performing the update.
By default, the upstream configuration is used: https://github.com/systemd/systemd/blob/main/units/systemd-sysupdate.timer
Type: attribute set of (systemd option)
Default
{ }
Example
{OnCalendar = "Sun 14:00:00";Unit = "foo.service";}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/sysupdate.nix
systemd.sysupdate.transfers
Specify transfers as a set of the names of the transfer files as the key and the configuration as its value. The configuration can use all upstream options. See https://www.freedesktop.org/software/systemd/man/sysupdate.d.html for all available options.
Type: attribute set of attribute set of section of an INI file (attrs of INI atom (null, bool, int, float or string) or a non-empty list of them)
Default
{ }
Example
{"10-uki" = {Source = {MatchPattern = ["nixos_@v+@l-@d.efi""nixos_@v+@l.efi""nixos_@v.efi"];Path = "https://download.example.com/";Type = "url-file";};Target = {InstancesMax = 2;MatchPattern = '' nixos_@v+@l-@d.efi"; \ nixos_@v+@l.efi \ nixos_@v.efi '';Mode = "0444";Path = "/EFI/Linux";PathRelativeTo = "boot";TriesDone = 0;TriesLeft = 3;Type = "regular-file";};Transfer = {ProtectVersion = "%A";};};}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/sysupdate.nix