From a042d9129008d0a929d2541e70b5553d9dad2588 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 11 Oct 2013 14:07:53 +0200 Subject: [PATCH] nixos-rebuild: Document --profile-name --- nixos/doc/manual/man-nixos-rebuild.xml | 37 +++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml index e43dafd3cfe..e08153c723d 100644 --- a/nixos/doc/manual/man-nixos-rebuild.xml +++ b/nixos/doc/manual/man-nixos-rebuild.xml @@ -33,6 +33,14 @@ + + + + + + name + + @@ -229,7 +237,34 @@ $ ./result/bin/run-*-vm /etc/nixos/configuration.nix, roll back to the previous configuration. (The previous configuration is defined as the one before the “current” generation of the - profile /nix/var/nix/profiles/system.) + Nix profile /nix/var/nix/profiles/system.) + + + + + + + + Instead of using the Nix profile + /nix/var/nix/profiles/system to keep track + of the current and previous system configurations, use + /nix/var/nix/profiles/system-profiles/name. + When you use GRUB 2, for every system profile created with this + flag, NixOS will create a submenu named “NixOS - Profile + 'name'” in GRUB’s boot menu, + containing the current and previous configurations of this + profile. + + For instance, if you want to test a configuration file + named test.nix without affecting the + default system profile, you would do: + + +$ nixos-rebuild switch -p test -I nixos-config=./test.nix + + + The new configuration will appear in the GRUB 2 submenu “NixOS - Profile + 'test'”.