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

add homeManagerModules #224

Closed
wants to merge 1 commit into from

Conversation

cdmistman
Copy link

like #223 does for nix-darwin modules, it'd be great to encourage broader sharing of home-manager modules.

@terlar
Copy link

terlar commented Apr 26, 2024

I know in the wild there are:

  • homeManagerModules
  • homeModules
  • hmModules

I am not sure if the community ever decided on one way. Anyways, this should probably live as a flake part integration in home-manager? And not in the base flake-parts?

@cdmistman
Copy link
Author

i'm not sure if the community ever settled on one, but homeManagerModules aligns most with the naming conventions elsewhere and is the most explicit.

regardless, i think it's better to have this in flake-parts, so 3rd party flakes don't need to add home-manager as an input when they don't use any other home-manager flake outputs.

@roberth
Copy link
Member

roberth commented Apr 26, 2024

Ideally, home manager picks an evalModules class name, and then we can add a generic flake.modules.<class>.<module name> option, to support all the module system applications in one go.
Basically that means to finish

Maybe even add it to the core modules.

Anyways, this should probably live as a flake part integration in home-manager?

That's generally how flake-parts is intended to be extended. Some reasons:

  • Give control to the authors of that project, so that they are free to manage their "entrypoint" as is right for that project.
  • Let users pick the integrations they want, without having to fight a built-in module (which could become stagnant).
  • No unnecessary dependencies or undeclared hardcoded input names. (Nixpkgs is an exception I'd like to get rid of in this regard)

homeManagerModules aligns most with the naming conventions elsewhere

I'd recommend evalModules { class = "homeManager"; } to them then. EDIT: Done: nix-community/home-manager#5339

better to have this in flake-parts, so 3rd party flakes don't need to add home-manager as an input when they don't use any other home-manager flake outputs.

That would be a fair reason, but I do think the generic solution (#213) is preferable.

Perhaps unrelatedly, a module that sets homeManagerConfigurations should definitely live in the home-manager repo, because that's not as simple, and it requires an actual home manager, which is naturally available there.

@cdmistman
Copy link
Author

oooooh i didn't see #213 - that looks like a much better solution :) thank you!

@cdmistman cdmistman closed this Apr 28, 2024
@cdmistman cdmistman mentioned this pull request Apr 28, 2024
@cdmistman cdmistman deleted the home-manager-module branch April 28, 2024 03:11
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.

3 participants