From 8edc5b4fdbc67de1042e57ca55174f48c2394bc6 Mon Sep 17 00:00:00 2001 From: Aaron Janse Date: Sat, 2 Mar 2019 03:36:13 -0800 Subject: [PATCH] nixos-rebuild: add page (#2809) --- pages/linux/nixos-rebuild.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pages/linux/nixos-rebuild.md diff --git a/pages/linux/nixos-rebuild.md b/pages/linux/nixos-rebuild.md new file mode 100644 index 000000000..7207b3c0d --- /dev/null +++ b/pages/linux/nixos-rebuild.md @@ -0,0 +1,32 @@ +# nixos-rebuild + +> Reconfigure a NixOS machine. +> Documentation: . + +- Build and switch to the new configuration, making it the boot default: + +`sudo nixos-rebuild switch` + +- Build and switch to the new configuration, making it the boot default and naming the boot entry: + +`sudo nixos-rebuild switch -p {{name}}` + +- Build and switch to the new configuration, making it the boot default and installing updates: + +`sudo nixos-rebuild switch --upgrade` + +- Rollback changes to the configuration, switching to the previous generation: + +`sudo nixos-rebuild switch --rollback` + +- Build the new configuration and make it the boot default without switching to it: + +`sudo nixos-rebuild boot` + +- Build and activate the new configuration, but don't make a boot entry (for testing purposes): + +`sudo nixos-rebuild test` + +- Build the configuration and open it in a virtual machine: + +`sudo nixos-rebuild build-vm`