Provide a way to access both nvf flake inputs and user-supplied inputs in modules
⚠️ Please verify that this feature request has NOT been suggested before.
- [x] I checked and didn't find a similar feature request
🏷️ Feature Type
Other
🔖 Feature description
Currently nvf puts its own flake's inputs into specialArgs, ensuring nvf modules have access to inputs they expect. But this approach means if I want to pass my own flake's inputs (via extraSpecialArgs) for use in my configuration or modules, there is no way to do so. my inputs are always overwritten.
✔️ Solution
A pattern or mechanism to make both sets of inputs accessible in modules:
- nvf’s own flake inputs (as needed by nvf itself and its modules)
- User’s own flake inputs, passed via extraSpecialArgs, for custom configuration
❓ Alternatives
No response
📝 Additional Context
No response
bump
I keep telling myself I'll respond to this and forget to while thinking about my response.
To be very clear, this is more of a limitation with Nix than it is with nvf. We have to use inputs internally (though it could very well be renamed, it's not a reserved name) to access our flake inputs-- which is primarily used for the Neovim wrapper that we use. Previously we also used plugins and language servers from inputs, but that is no longer the case. The shortest solution to the problem is passing flake inputs to `specialArgs under a different name. Something like:
extraSpecialArgs = {
myInputs = inputs;
}
would do. We could also rename inputs internally, but that is a refactor I'd rather not concern the contributors for at least until 0.8 is released.
Makes sense.
I made a small change in my fork, renaming the internal inputs and self to nvfInputs and nvfFlake, so I could pass my own inputs through extraSpecialArgs without it getting overridden.
Let me know if it would be helpful to open a PR.
I'm not entirely sure if a fork, or even if a PR is necessary. While passing inputs to nvf, you can simply name them differently and it should work as intended.