Skip to content

flake: introduce sets#2226

Merged
katexochen merged 5 commits intomainfrom
p/contrast-builder-v2
Mar 6, 2026
Merged

flake: introduce sets#2226
katexochen merged 5 commits intomainfrom
p/contrast-builder-v2

Conversation

@katexochen
Copy link
Member

No description provided.

Sets allow to instantiate pkgs with different overlays.
This first change is a pure refactoring and should not have functional
changes. The 'base' set is equivalent to the previous single 'pkgs'
instance.
@katexochen katexochen requested a review from charludo March 4, 2026 13:16
@katexochen katexochen added the no changelog PRs not listed in the release notes label Mar 4, 2026
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-03-06 12:21 UTC

@katexochen katexochen force-pushed the p/contrast-builder-v2 branch 4 times, most recently from b464de2 to 6df49ae Compare March 4, 2026 14:16
Copy link
Collaborator

@charludo charludo left a comment

Choose a reason for hiding this comment

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

This mostly looks good to me. Not gonna pretend I 100% understand 17f577e though 😅

Would you be OK with aliasing the base set to the top-level output? I understand why it makes sense to have .#base.*, esp. in the justfile to easily toggle sets, but having to run e.g. nix run .#base.scripts.generate or nix build .#base.contrast.docs instead of just nix run .#scripts.generate or nix build .#contrast.docs seems counter-intuitive when those packages do not depend on the kata image at all, and are also already scoped either under scripts or contrast.

@katexochen
Copy link
Member Author

Would you be OK with aliasing the base set to the top-level output? I understand why it makes sense to have .#base.*, esp. in the justfile to easily toggle sets, but having to run e.g. nix run .#base.scripts.generate or nix build .#base.contrast.docs instead of just nix run .#scripts.generate or nix build .#contrast.docs seems counter-intuitive when those packages do not depend on the kata image at all, and are also already scoped either under scripts or contrast.

I thought about this, too, but I'm unsure about it. The way it currently is it is verbose and might be a bit annoying to type, but moving base top-level would bear the risk of devs writing things in a way that is not "set-aware", thus increasing the mental load during development/review. Another point is that while it might be easier to use, it complicates the nix structure hand makes it even harder to work with. Your choice. :)

@katexochen katexochen force-pushed the p/contrast-builder-v2 branch from 6df49ae to 5b52458 Compare March 5, 2026 09:49
@katexochen katexochen marked this pull request as ready for review March 5, 2026 14:35
Copy link
Collaborator

@charludo charludo left a comment

Choose a reason for hiding this comment

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

I thought about this, too, but I'm unsure about it. The way it currently is it is verbose and might be a bit annoying to type, but moving base top-level would bear the risk of devs writing things in a way that is not "set-aware", thus increasing the mental load during development/review. Another point is that while it might be easier to use, it complicates the nix structure hand makes it even harder to work with. Your choice. :)

Yeah after what we've discussed, I get your reasoning, and as I said, this wasn't really a technically reasoned complaint. So, let's keep it as is.

I want to play around with the scripts + // vs overrideScopes issue we just talked about, but I'll do that regardless of this PR, so that should also not block this, since it should not currently be an issue afaik.

This is required for overrides to work correctly. Previously, overriding
a package in one scope (e.g. 'kata') wouldn't propagate properly into
another scope (e.g. 'contrast') that depends on that package from the
first scope.
@katexochen katexochen force-pushed the p/contrast-builder-v2 branch from 5b52458 to f408f7a Compare March 6, 2026 11:00
@katexochen katexochen merged commit 29ae1e3 into main Mar 6, 2026
19 of 20 checks passed
@katexochen katexochen deleted the p/contrast-builder-v2 branch March 6, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PRs not listed in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants