Micron Document
boot labels in nix

There's a T383838system.nixos.label configuration key that can be set in the T383838configuration.nix or at the command line with an environment variable T383838NIXOS_LABEL when performing a T383838nixos-rebuild switch.

It has a pattern it must conform to that doesn't allow spaces, but it does allow underscores.

Sample output of T383838nixos-rebuild list-generations where I'm rebuilding my pi4 laptop with a bigger drive


Generation Build-date NixOS version Kernel Configuration Revision Specialisation
6 current 2025-03-23 09:58:59 fixing_homemanager 6.6.31 *
5 2025-03-23 09:52:12 stable-base 6.6.31 *
4 2025-03-23 08:43:30 24.11.715908.7105ae395770 6.6.31 *

Entry 4 is the default, and entry 5 and 6 have been built with the environment variable set to the value shown under the NixOS version column.

Tags: nix

Tags
Navigation



created: 2025-03-23

(re)generated: 2026-07-17