Both nh os and nixos-rebuild will attempt to build the configuration at the top-level regardless of whether I am within a configuration or not. This sounds fine in a practical sense but it actually causes a lot of issues with attempting to switch into the configuration. It crashes both Plasma and Sway immediately, probably will crash Cosmic as well. nh in particular shows a massive diff via nvd despite many of those derivations not being necessary in the current specialisation.
Some kind of solution needs to be in place. I could not find any references to the specialisations in /run/current-system, so it seems I will need to perform something in the configuration itself. My first idea was to use environment.etc to create a living file containing the name of the specialisation, that then can be used by the --specialisation=<NAME> flag for both nh os and nixos-rebuild.
Both
nh os
andnixos-rebuild
will attempt to build the configuration at the top-level regardless of whether I am within a configuration or not. This sounds fine in a practical sense but it actually causes a lot of issues with attempting to switch into the configuration. It crashes both Plasma and Sway immediately, probably will crash Cosmic as well.nh
in particular shows a massive diff vianvd
despite many of those derivations not being necessary in the current specialisation.Some kind of solution needs to be in place. I could not find any references to the specialisations in
/run/current-system
, so it seems I will need to perform something in the configuration itself. My first idea was to useenvironment.etc
to create a living file containing the name of the specialisation, that then can be used by the--specialisation=<NAME>
flag for bothnh os
andnixos-rebuild
.