Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Generations, cleanup and actions

Generations

Every rebuild creates a generation of your system. The Generations page lists them (read from /nix/var/nix/profiles), newest first, with their date, NixOS version, kernel and specialisations. Tags mark the generation that is running, the one that is the default at boot and the one that was booted.

For every other generation you can:

  • Compare: list what differs from the running system (packages added, removed and changed, and the size). This uses nvd when it is installed, otherwise nix store diff-closures. The result is in the Console.
  • Test: run that generation until the next reboot.
  • Boot: make it the default from the next boot on.
  • Switch to: both: run it now and make it the default. With nh this runs nh os rollback --to that generation.

Test, Boot and Switch to ask for your password. If you activated a system with Test, the page notes that the running system is not one of the listed generations; it is replaced by the default generation at the next boot.

Cleanup

The Cleanup page shows how much space is free on the disk that holds the Nix store and how many system generations you have.

To free space:

  1. Set Keep at least: the number of newest generations to keep.
  2. Set And everything from: the number of days whose generations are kept as well.
  3. Optionally turn on Also deduplicate the store (slow, saves space).
  4. Click Clean up….

This runs nh clean all: it removes older generations, then everything nothing uses any more. nh lists what goes and asks before deleting; answer with Yes or No in the Console. Old boot menu entries disappear with the next rebuild.

Without nh, the app runs nix-collect-garbage --delete-older-than with the number of days instead; the number of generations to keep and the deduplication are then ignored.

Remove tried packages (…) frees the packages you started with Try it on the Packages page.

Actions

The Actions page holds one-off tasks and recommendations.

Create images

You can build your system as an image: a live or installer ISO, a VM disk, an SD card image, a container or a cloud image. The list of formats comes from your NixOS version (its built-in image builder, system.build.images).

  1. Choose the system (this host or another host of your flake) and the format.
  2. Click Build image. Building can take a while; the progress is in the Console.
  3. When it is done, the page shows “… image ready” with:
    • Save as…: copy the image somewhere,
    • Show in folder: open the folder that holds it,
    • Start in VM: boot it in QEMU. The image itself is not changed.

Recommendations

Once the current values of your configuration are evaluated, the app suggests improvements that your configuration does not have yet, for example:

  • installing nh,
  • deduplicating the Nix store automatically,
  • cleaning up old generations automatically,
  • turning on the NixOS manual,
  • fixing option documentation that fails to evaluate,
  • removing old generations when many are kept,
  • updating nixpkgs when it is old.

Each suggestion has a button: Stage this change stages the setting and opens the Changes page (apply it like any other change), Open goes to the page that handles it, and Show them opens the options concerned on the Options page. When there is nothing to suggest, the page says so.