Skip to content

Add a flake.nix to all template to implement "inputOverrides" pattern - #19

Draft
jbgi wants to merge 1 commit into
denful:mainfrom
jbgi:template-update
Draft

Add a flake.nix to all template to implement "inputOverrides" pattern#19
jbgi wants to merge 1 commit into
denful:mainfrom
jbgi:template-update

Conversation

@jbgi

@jbgi jbgi commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Draft, depends on #18 and need pins update after #18 get merged.
Ready for review/merge.

@jbgi
jbgi marked this pull request as draft September 1, 2026 17:32
@vic

vic commented Sep 3, 2026

Copy link
Copy Markdown
Member

#18 merged now

and update all pins. Exclude generated template files from formatting.
@jbgi
jbgi marked this pull request as ready for review September 4, 2026 08:18
@vic

vic commented Sep 11, 2026

Copy link
Copy Markdown
Member

@jbgi one question: Is there any particular reason we are adding flake.nix to all templates ? This project is supposed for "setups without flake.nix", so maybe there's value of showing your override inputs pattern in the flake template only. Do you believe it is necessary for all templates to have a flake.nix ?

@jbgi

jbgi commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

@vic My main goal is to be able to override and/or follows inputs of any with-inputs-based project. That requires a convention for finding the ouputs function , thus using the flake one, as it is well-defined and I figured most project would expose a flake.nix anyway, for compatibility with flake.

But we could also support a non-flake way to inject inputsOverrides, by checking if a source has a default.nix exposing a function with all arguments being optional, including one being name inputsOverrides. It sounds a bit more fragile though... but I can open a PR to support this if you'd like?

@jbgi
jbgi marked this pull request as draft September 12, 2026 16:33
@jbgi

jbgi commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

@vic actually found an issue with my input override via flake for some flake (eg. https://github.com/nix-community/nixpkgs.lib/blob/master/flake.nix). Opening a MR soon to switch to using default.nix as described above.

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.

2 participants