snippetbashTip
nixos-rebuild — Reconfigure a NixOS machine. More information: <https://nixos.org/nixos/manual/#sec-changing-config>
Viewed 0 times
commandcliinformationreconfiguremachinenixos-rebuildmorenixos
linux
Problem
How to use the
nixos-rebuild command: Reconfigure a NixOS machine. More information: <https://nixos.org/nixos/manual/#sec-changing-config>.Solution
nixos-rebuild — Reconfigure a NixOS machine. More information: <https://nixos.org/nixos/manual/#sec-changing-config>.Build and switch to the new configuration, making it the boot default:
sudo nixos-rebuild switchBuild and switch to the new configuration, making it the boot default and naming the boot entry:
sudo nixos-rebuild switch {{[-p|--profile-name]}} {{name}}Build and switch to the new configuration, making it the boot default and installing updates:
sudo nixos-rebuild switch --upgradeRollback changes to the configuration, switching to the previous generation:
sudo nixos-rebuild switch --rollbackBuild the new configuration and make it the boot default without switching to it:
sudo nixos-rebuild bootBuild and activate the new configuration, but don't make a boot entry (for testing purposes):
sudo nixos-rebuild testBuild the configuration and open it in a virtual machine:
sudo nixos-rebuild build-vmList available generations similar to the boot loader menu:
nixos-rebuild list-generationsCode Snippets
Build and switch to the new configuration, making it the boot default
sudo nixos-rebuild switchBuild and switch to the new configuration, making it the boot default and naming the boot entry
sudo nixos-rebuild switch {{[-p|--profile-name]}} {{name}}Build and switch to the new configuration, making it the boot default and installing updates
sudo nixos-rebuild switch --upgradeRollback changes to the configuration, switching to the previous generation
sudo nixos-rebuild switch --rollbackBuild the new configuration and make it the boot default without switching to it
sudo nixos-rebuild bootContext
tldr-pages: linux/nixos-rebuild
Revisions (0)
No revisions yet.