What's the proper way to nixos-rebuild?

The manual provides a few options:

  1. nixos-rebuild test
  2. nixos-rebuild boot
  3. nixos-rebuild switch -p test

I am missing the option that does nixos-rebuild switch but also adds the previous configuration to grub. Does it exist?

The previous configuration should be in grub already, as well as the current.

And nixos-rebuild switch will make the current the previous, the previous that one before provious and the new one the current.

Ah, indeed. Under “All configurations” there is a numbered bunch.

Are they counting up or displaying age? So is 1 the oldest or - in my case I have 1, 2, 3 - is 3 the oldest?

1 is the first you created, everything you do a switch your current generation number gets increased by 1.

1 Like