When running nixos-rebuild --specialisation on a specialisation not declared in e.g. configuration.nix, such as
nixos-rebuild --specialisation my-nonexistent-specialisation
then you only get
building the system configuration...
Command exited with non-zero status 1
but no sensible error message.
It should best print e.g. --specialisation my-nonexistent-specialisation: This specialisation does not exist.
Tested on NixOS 25.05.
When running
nixos-rebuild --specialisationon a specialisation not declared in e.g.configuration.nix, such asthen you only get
but no sensible error message.
It should best print e.g.
--specialisation my-nonexistent-specialisation: This specialisation does not exist.Tested on NixOS 25.05.