Repository navigation
Conversation
this is what a required overlay fixes & removes a lot of switches
& prefer it since no experimental features are required. `tar.zst` would be better for the Nixpkgs fetch example but Zstandard support isn’t in all Nix version.
toastal
force-pushed
the
decoupled-overlay
branch
from
November 12, 2026 14:28
ac17911 to
0c2a05c
Compare
nlewo
reviewed
Nov 12, 2026
|
|
||
| ```nix | ||
| "pkgs.comin or comin.packages.\${system}.default or null" | ||
| pkgs.comin |
Owner
There was a problem hiding this comment.
Do you think it would be possible to add a message at eval time explaining the overlay is now required?
Author
There was a problem hiding this comment.
Probably with the warning or assertion systems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
Why not make the project more stable-Nix-friendly too! Currently, the flake is too, dare we say in the age of LLMs, “load-bearing”—especially in the case of stable Nix users, where all they need is an overlay + a module to
import. This also now frees upflake = falseto be used by flake users that wish to avoid your transitive flake dependencies which are not needed to run: flake-compat, treefmt-nix.Flakes’ design patterns have introduced some flaws in the Nix code from my viewpoint as a path of less resistance solved by overlay-driven Nix:
selfis curried & unreachable to users) & can’t “just” be importednullchecks in the module to handle this coupling, fallback in the modules that can be simplified by requiring the overlaycallPackagethat users can override at any time (not just at the modulepackageboundary)comininto packages likelint.nixcomin-toolsoverlay + scope also now remove therecbut also makes it too easier to use even inside the flakesystem.nixvs.flake.nix).High-level changes
nix/overlay/{default,tools}.nixdirectory with overlays that now drive the flake (packages, checks){ self }from the modules to make them properly composablelib.modules.importApplycominpackage, thus dropping asserts, nullability, fallbackslint.nixis now valid package withcallPackagesystem.nixexample which requires no experimental features)Migration
This is breaking. But, a lot of the module complexity is hinged on avoiding the overlay. However, the overlay is reducing project complexity while also enabling users more flexibility in how/where to include it & now with the ability to override it since it isn’t baked into
self. The overlay was accessible(ish, flake-compat) before, but I believe should have been the only way.Nothing else is changed from the user or developer standpoint (flake
packagesstill the same names).nix --extra-experimental-features flakes flake checkstill passes. Patchset here can be read by commit. If only some ideas are good, feel free to cherrypick.1
Footnotes
Please consider giving up MS GitHub or offering a non-proprietary, non-US-corporate-controlled mirror for this free software project. I wish to delete this Microsoft account in the future, but I need more projects like this to support alternative methods to send patches & contribute. ↩