-
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add inputs' and self' aspects #117
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for inputs' and self' context variables throughout the module system without relying on specialArgs. The implementation uses the withSystem function to inject system-specific inputs and self references into module contexts.
- Introduces
withSystemparameter to enable per-system context injection - Wraps
mainModulecreation withwithSystemto provideinputs'andself'from flake-parts - Threads the new context variables through all dependency and integration functions
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| modules/options.nix | Adds withSystem parameter and passes it to _types.nix |
| modules/_types.nix | Wraps mainModule function with withSystem to inject inputs' and self' into aspect context |
| modules/aspects/provides/home-manager.nix | Updates homeManager function to accept and forward inputs' and self' parameters |
| modules/aspects/dependencies.nix | Updates all dependency functions (osDependencies, osUserDependencies, hmUserDependencies, hmStandaloneDependencies) to accept and propagate inputs' and self' |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c892780 to
f2c8395
Compare
|
Hey, thanks for the PR!
I'm still working on decoupling flake-file from flakes (using unflake) but will keep this open and take a more deeper look later. |
|
Den has a test suite now, and each feature is tested. Could you provide a test that shows it is NOT possible to use |
|
It is really not possible currently, but yeah, it won't be supported for configurations that aren't using flake-parts, so I will just use |
|
Can you show me an example of where you are trying to use it and are unable to ? How about using We currently depend on Line 31 in 3ec4327
|
I can use it in perSystem or by using withSystem, so if I want to use it in an aspect I would have to use withSystem, but then it would be too verbose. I currently have one use case that is basically importing my wrapped neovim from another flake with |
79e7bc7 to
6739104
Compare
|
I haven't tried it but if I'd prefer if we made something like this possible: But we extending a module that is included in all aspects, so all have access to this In other words: being able to contribute to a module that is part of all aspects ? Is it |
622a6ce to
90adb7e
Compare
1e9eea4 to
622649b
Compare
103e17c to
66a572a
Compare
|
Fixed the aspect issue, any thoughts on why it fails on darwin? |
6a4351e to
685ddcc
Compare
685ddcc to
3a7178f
Compare
|
Ok, I understood what went wrong, the host and home we are checking is x86_64-linux only, when we run it through perSystem it uses its respective system such as aarch64-darwin, but the host and home still uses the same system as before |
|
Awesome! I'm merging this! Can I ask for another favor ? Please update the wiki documentation just so we have a way for people to discover Thanks! |
|
Where is it? |
|
Here: https://github.com/vic/den/wiki (it was private haha) |
|
Get published on any file change at https://den.oeiuwq.com/ |
|
Ok! |
|
I improved the descriptions of these aspects in #118, also I am not able to edit the wiki apparently |
|
Oh, Ok. I'll update then wiki tomorrow then. Thanks so much I'll also merge #118 |
Adds
inputs'andself'aspects