viperML / nh

Yet another nix cli helper
European Union Public License 1.2
894 stars 35 forks source link

Activate home-manager specialisation #80

Open ErrorNoInternet opened 6 months ago

ErrorNoInternet commented 6 months ago

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.

viperML commented 6 months ago

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 commented 6 months ago

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?

ErrorNoInternet commented 6 months ago

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?

viperML commented 6 months ago

Yes