nh icon indicating copy to clipboard operation
nh copied to clipboard

Activate home-manager specialisation

Open ErrorNoInternet opened this issue 1 year ago • 4 comments

nh os switch -S should maybe also activate the home-manager specialization with the same name (probably behind a flag)? Currently I have to run home-manager generations, copy the store path of the latest generation, then manually run /nix/store/...-home-manager-generation/specialisation/<name/activate.

One caveat is https://github.com/nix-community/home-manager/issues/4073 though.

ErrorNoInternet avatar Apr 05 '24 09:04 ErrorNoInternet

nh os doesn't activate home-manager specialisations, that is bound to the nixos activation script and the home-manager module implementation.

I know that the nh home codepath doesn't implement home-manager standalone's specialisations, but you are asking about a different thing

viperML avatar Apr 05 '24 09:04 viperML

By the way, if you are using HM as a nixos module, can't you just leverage nixos's specialisations instead of using HM's?

viperML avatar Apr 05 '24 10:04 viperML

Ah yeah it seems to actually work. Just did home-manager.users.* = {} in a NixOS specialisation, thanks! Should we keep this open for standalone home-manager specialisations?

ErrorNoInternet avatar Apr 05 '24 14:04 ErrorNoInternet

Yes

viperML avatar Apr 05 '24 14:04 viperML