From 077e24712a0f9bcaccb7764ee83c629b957bb9c0 Mon Sep 17 00:00:00 2001 From: Maurice Zhou Date: Thu, 2 Jun 2022 06:40:23 +0200 Subject: [PATCH] NixOS: update system major version inside configuration files Signed-off-by: Maurice Zhou --- .../NixOS/Root on ZFS/4-system-installation.rst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/Getting Started/NixOS/Root on ZFS/4-system-installation.rst b/docs/Getting Started/NixOS/Root on ZFS/4-system-installation.rst index ece1c87..faf969c 100644 --- a/docs/Getting Started/NixOS/Root on ZFS/4-system-installation.rst +++ b/docs/Getting Started/NixOS/Root on ZFS/4-system-installation.rst @@ -120,21 +120,29 @@ Upgrade to a newer major version Upgrading to a newer major version involves switching software distribution channel. -#. To view existing channels, run as root:: +#. View existing channels, run as root:: nix-channel --list #nixos https://nixos.org/channels/nixos-21.11 #this is the major version released around November 2021 -#. To view available channels:: +#. View available channels:: 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 +#. 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. Immutable root file system