Skip to content

Conversation

Lunarnovaa
Copy link
Collaborator

Some users may wish to use HJR but be discouraged by lengthening eval times. For that reason, we have added an output that links to the module collection, extensively modified README.md, and stopped importing the entire module collection by default.

Users who still want to import the entire module collection automatically can use lib.filesystem.listFilesRecursive, as explained in the readme.

While I am marking this as ready for review since it does in fact work in my config, I am not entirely set on this approach and would love some feedback.

Closes #65.

@Lunarnovaa Lunarnovaa requested review from NotAShelf and nezia1 May 17, 2025 22:50
@Lunarnovaa
Copy link
Collaborator Author

Forgot to fix tests, gotta quickly fix that.

@NotAShelf
Copy link
Member

I'm not entirely sure that this is a good idea.

The technicall implementation appears sound, but we have to remember that Hjem-Rum is designed to bridge the gap between Hjem (the performant option) and Home-Manager (the non-performant option). I wonder if we could do something like inputs.hjem-rum.hjemModules.programs, inputs-hjem-rum.hjemModules.all etc. to make the module imports more convenient for the user, and easier to document. The current implementation will be confusing for those relatively new to the ecosystem, which HJR is catering to.

@Lunarnovaa
Copy link
Collaborator Author

Lunarnovaa commented May 17, 2025

I'm not entirely sure that this is a good idea.

The technicall implementation appears sound, but we have to remember that Hjem-Rum is designed to bridge the gap between Hjem (the performant option) and Home-Manager (the non-performant option). I wonder if we could do something like inputs.hjem-rum.hjemModules.programs, inputs-hjem-rum.hjemModules.all etc. to make the module imports more convenient for the user, and easier to document. The current implementation will be confusing for those relatively new to the ecosystem, which HJR is catering to.

One option is having inputs.hjem-rum.hjemModules.hjem-rum-complete (which is also inputs.hjem-rum.hjemModules.default) which imports everything the old way, and then inputs.hjem-rum.hjemModules.hjem-rum-bare (working title) that doesn't import anything by default. That way, we could still have the average user import everything without confusing them with lib.filesystem.listFilesRecursive, and offer the alternative to more advanced users who want to use HJR but don't want the performance costs.

Edit: Improved possible hjemModule names.

@Lunarnovaa Lunarnovaa force-pushed the optionalImports branch 2 times, most recently from 49f28e7 to 96a32c7 Compare May 18, 2025 18:12
@Lunarnovaa
Copy link
Collaborator Author

Updated with an improved new user experience.

Copy link
Collaborator

@nezia1 nezia1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this review is more of a suggestion than anything. Feel free to dismiss it :)

Copy link
Contributor

@llakala llakala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the implementation! My big question is about whether we can handle dependencies internally - everything else is nitpicks.Pardon any line comments that are actually referring to an entire paragraph - I'm not very good at Github review.

> Hjem continues to be developed, Hjem Rum will be worked on as we build modules
> and functionality out to support average users.
> ready to fully replace Home Manager in the average user's configuration, but
> if you truly want to, an option could be to use both in conjunction. Either
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of unrelated changes in this commit, that should be split into their own commit.

@a-usr a-usr added the enhancement New feature or request label Jun 18, 2025
Some users may wish to use hjr but be discouraged by lengthening eval
times. For that reason, we have added an output that links to the module
collection, extensively modified README.md, and stopped importing the
entire module collection by default.

Users who still want to import the entire module collection
automatically can use `lib.filesystem.listFilesRecursive`, as explained
in the readme.
@DamitusThyYeetus123
Copy link

Would it be possible to individually import specific modules? That way you're only importing precisely what's needed rather than some vague "bare" or a maximal "complete"

@Lunarnovaa
Copy link
Collaborator Author

Lunarnovaa commented Sep 28, 2025

Would it be possible to individually import specific modules? That way you're only importing precisely what's needed rather than some vague "bare" or a maximal "complete"

That's exactly what the bare module is for. The bare module just extends Hjem for our modules to function properly, you then import specific modules as desired.

This PR is currently in major limbo for various reasons though, I'm not sure if it will see the light of day any time soon. It'll require major work to make mergeable and still has some annoyances that leads to nobody really being happy with it. As it is, even if we got it merged, it would add more chores for contributors and maintainers to keep track of. Ideally, I would want a solution to solve the issue that works seamlessly for those who want it while also not bloating the maintenance burden or conflicting with the intended audience's experience, namely those who don't mind the eval bloat and don't want to learn to write their own modules.

For you and anyone else interested in this PR, I would suggest you just figure out your programs yourself and learn how to write your own modules for your own config. Or if you really want to make this work, go ahead and try to write your own PR for it and see if it meets approval. I would truly be impressed if someone actually managed it, even just a prototype would be interesting to see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find a long-term solution to increasing eval times

6 participants