nixos-rebuild
Reconfigure a NixOS machine. tldr-pages
On Linux
Linux
Build and switch to the new configuration, making it the boot default
sudo nixos-rebuild switchIdentifyBuild and switch to the new configuration, making it the boot default and naming the boot entry
sudo nixos-rebuild switch --profile-name nameIdentifyBuild and switch to the new configuration, making it the boot default and installing updates
sudo nixos-rebuild switch --upgradeIdentifyRoll back changes to the configuration, switching to the previous generation
sudo nixos-rebuild switch --rollbackIdentifyBuild the new configuration and make it the boot default without switching to it
sudo nixos-rebuild bootIdentifyBuild and activate the new configuration, but don't make a boot entry (for testing purposes)
sudo nixos-rebuild testIdentifyBuild the configuration and open it in a virtual machine
sudo nixos-rebuild build-vmIdentifyList available generations similar to the boot loader menu
nixos-rebuild list-generationsIdentify