MyNixOS website logo

NixOS version name to be used in the names of generated outputs and boot labels.

If you ever wanted to influence the labels in your GRUB menu, this is the option for you.

It can only contain letters, numbers and the following symbols: :, _, . and -.

The default is system.nixos.tags separated by "-" + "-" + NIXOS_LABEL_VERSION environment variable (defaults to the value of system.nixos.version).

Can be overridden by setting NIXOS_LABEL.

Useful for not loosing track of configurations built from different nixos branches/revisions, e.g.:

#!/bin/sh
today=`date +%Y%m%d`
branch=`(cd nixpkgs ; git branch 2>/dev/null | sed -n '/^\* / { s|^\* ||; p; }')`
revision=`(cd nixpkgs ; git rev-parse HEAD)`
export NIXOS_LABEL_VERSION="$today.$branch-${revision:0:7}"
nixos-rebuild switch
Declarations
Type
string matching the pattern [a-zA-Z0-9:_\.-]*