NixOS: update system major version inside configuration files
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
This commit is contained in:
committed by
George Melikov
parent
1cd6ef244f
commit
077e24712a
@@ -120,21 +120,29 @@ Upgrade to a newer major version
|
|||||||
Upgrading to a newer major version involves switching software
|
Upgrading to a newer major version involves switching software
|
||||||
distribution channel.
|
distribution channel.
|
||||||
|
|
||||||
#. To view existing channels, run as root::
|
#. View existing channels, run as root::
|
||||||
|
|
||||||
nix-channel --list
|
nix-channel --list
|
||||||
#nixos https://nixos.org/channels/nixos-21.11
|
#nixos https://nixos.org/channels/nixos-21.11
|
||||||
|
|
||||||
#this is the major version released around November 2021
|
#this is the major version released around November 2021
|
||||||
|
|
||||||
#. To view available channels::
|
#. View available channels::
|
||||||
|
|
||||||
w3m https://hydra.nixos.org/project/nixos
|
w3m https://hydra.nixos.org/project/nixos
|
||||||
|
|
||||||
#. To switch to a newer channel (22.05)::
|
#. Switch to a newer channel (22.05)::
|
||||||
|
|
||||||
nix-channel --add https://nixos.org/channels/nixos-22.05 nixos
|
nix-channel --add https://nixos.org/channels/nixos-22.05 nixos
|
||||||
|
|
||||||
|
#. In ``/etc/nixos/configuration.nix``::
|
||||||
|
|
||||||
|
system.stateVersion = "22.05";
|
||||||
|
|
||||||
|
If using Home Manager, in ``~/.config/nixpkgs/home.nix``::
|
||||||
|
|
||||||
|
home.stateVersion = "22.05";
|
||||||
|
|
||||||
#. Then follow the procedures for updating witin minor versions.
|
#. Then follow the procedures for updating witin minor versions.
|
||||||
|
|
||||||
Immutable root file system
|
Immutable root file system
|
||||||
|
|||||||
Reference in New Issue
Block a user