How to use spaces in system.nixos.label / NIXOS_LABEL

I’ve tried setting NIXOS_LABEL_VERSION and NIXOS_LABEL and when adding a space it fails to build.

on the boot menu i see that there is spaces in the default boot entries like with “NixOS (Generation 2…” so why can system.nixos.label not contain spaces?

is it intended to use nixos-rebuild -p, from reading the docs about -p it appears that it is not renaming the entry but creating a folder for new entries and adding a new entry into it.

this is the update script i’m trying to use this in: nixconf/home/shellScripts/update/main.sh at ded106391eae6c4e245884f13aefc0959470ea4b · rsa17826/nixconf · GitHub

1 Like

The documentation for the option, by omission, states that you cannot use spaces.

The full string is generated in the file below. Presumably you would have to modify some of the generation code to achieve what you want.