以 nixos-22.05更新22.11为例(需要以 root 用户身份执行):
首先添加22.11的nix-channel
# nix-channel --add https://mirrors.ustc.edu.cn/nix-channels/nixos-22.11nixos
# nix-channel --update
然后使用rebuild进行系统升级
nixos-rebuild switch --upgrade
以 nixos-22.05更新22.11为例(需要以 root 用户身份执行):
首先添加22.11的nix-channel
# nix-channel --add https://mirrors.ustc.edu.cn/nix-channels/nixos-22.11nixos
# nix-channel --update
然后使用rebuild进行系统升级
nixos-rebuild switch --upgrade