Skip to content

Allow switching between specialisations. #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

daschw
Copy link
Contributor

@daschw daschw commented May 18, 2025

Prefer switching to specialisation provided as --specialisation argument over current specialisation.


Currently, assuming a config like in the README

{config, pkgs, ...}: {
  specialisation."foo".configuration = {
    environment.etc."specialisation".text = "foo";
    # ..rest of config
  };

  specialisation."bar".configuration = {
    environment.etc."specialisation".text = "bar";
    # ..rest of config
  };
}

we have this - in my optinion - unexpected behaviour:

nh os switch -s foo # switch to foo
nh os switch -s bar # switch back to no-specialisation

After these changes

nh os switch -s bar

and

nh home switch -s bar

switch to the bar specialisation regardless of the current specialisation.

@daschw
Copy link
Contributor Author

daschw commented May 18, 2025

I guess this will be fixed by #281 anyways

@daschw daschw closed this May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant