nh
nh copied to clipboard
support standalone home-manager specialisations
Hi thanks for this awesome helper!
I have dark and light theme specialisations in my home-manager config and I would like to pass a specialisation arg to nh home switch
just like for nh os switch
. Furthermore I'd like to be able to make nh home switch
auto-detect and activate the current specialisation in my home-manager config.
I saw in #80 that this is currently not supported. So I tried to implement this myself following along the implementation for the nixos system. This PR is what I came up with. I tested the ~/.local/share/home-manager/specialisation
part with my personal home-manager configuration. However, I can change the path, if a different location is preferred.
I suppose this fixes #80.
Thank you, if you just copied the NixOS implementation then it looks good to me.
I don't have much time to test this (as I neither use HM specialisations), and we also don't have any type of test suite, so it would be nice to hear from other people if this works for them.
Thanks for your quick response! Yes, I basically just copied the NixOS implementation. I completely understand that your time is limited. Is there anything I can do to make testing for you or others easier?
Is there anything I can do to make testing for you or others easier?
NH doesn't have any test, but I don't know what the best approach is to testing this type of application (I also don't have much experience with testing anyways).
But I think that is out of the scope of this PR.