doc: Add documentation for the new option to the Automatic Upgrades section
This commit is contained in:
parent
2de41ccab3
commit
73220589e0
@ -120,12 +120,17 @@ nixos https://nixos.org/channels/nixos-unstable
|
|||||||
to <filename>configuration.nix</filename>:
|
to <filename>configuration.nix</filename>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<xref linkend="opt-system.autoUpgrade.enable"/> = true;
|
<xref linkend="opt-system.autoUpgrade.enable"/> = true;
|
||||||
|
<xref linkend="opt-system.autoUpgrade.allowReboot"/> = true;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
This enables a periodically executed systemd service named
|
This enables a periodically executed systemd service named
|
||||||
<literal>nixos-upgrade.service</literal>. It runs <command>nixos-rebuild
|
<literal>nixos-upgrade.service</literal>. If the <literal>allowReboot</literal>
|
||||||
switch --upgrade</command> to upgrade NixOS to the latest version in the
|
option is <literal>false</literal>, it runs <command>nixos-rebuild switch
|
||||||
current channel. (To see when the service runs, see <command>systemctl
|
--upgrade</command> to upgrade NixOS to the latest version in the current
|
||||||
list-timers</command>.) You can also specify a channel explicitly, e.g.
|
channel. (To see when the service runs, see <command>systemctl list-timers</command>.)
|
||||||
|
If <literal>allowReboot</literal> is <literal>true</literal>, then the
|
||||||
|
system will automatically reboot if the new generation contains a different
|
||||||
|
kernel, initrd or kernel modules.
|
||||||
|
You can also specify a channel explicitly, e.g.
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<xref linkend="opt-system.autoUpgrade.channel"/> = https://nixos.org/channels/nixos-19.09;
|
<xref linkend="opt-system.autoUpgrade.channel"/> = https://nixos.org/channels/nixos-19.09;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
Loading…
Reference in New Issue
Block a user