Skip to content
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

support standalone home-manager specialisations #109

Closed
wants to merge 4 commits into from

Conversation

daschw
Copy link

@daschw daschw commented May 12, 2024

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.

@viperML
Copy link
Owner

viperML commented May 13, 2024

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.

@daschw
Copy link
Author

daschw commented May 13, 2024

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?

@viperML
Copy link
Owner

viperML commented May 14, 2024

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.

@viperML
Copy link
Owner

viperML commented Nov 21, 2024

I'll close this one, you may need to rebase with latest changes if you want to reopen it

@viperML viperML closed this Nov 21, 2024
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.

Activate home-manager specialisation
2 participants