refactor(flakes): define the nixpkgs channel once in channels/ (26.05 + DRY)#40
Open
JacobPEvans-personal wants to merge 1 commit into
Open
refactor(flakes): define the nixpkgs channel once in channels/ (26.05 + DRY)#40JacobPEvans-personal wants to merge 1 commit into
JacobPEvans-personal wants to merge 1 commit into
Conversation
…hells follow it A new channels/ pin flake holds the nixpkgs channel in ONE place (nixpkgs-26.05-darwin). The root flake and all 13 shells now declare channels.url = "path:./channels" (or ../../channels) + nixpkgs.follows = "channels/nixpkgs" instead of each repeating the channel string. nix forbids variables in `inputs`, so following a tiny pin flake is the nix-native "define once, inherit everywhere". - Isolated locks preserved (~2 nodes per mkShell shell); the ?dir=shells/X interface is unchanged, so no consumer .envrc changes are needed. - Future channel bumps = one-line edit in channels/flake.nix + lockfile-only relocks (Renovate-able), not the same string edited in 13+ files. - templates/ left as standalone scaffolds (their pins are intentional examples). Assisted-by: Claude:claude-opus-4-8
481a621 to
3ed7fc6
Compare
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.
What
Pins the nixpkgs channel in one place and has every shell follow it, instead of repeating
nixpkgs.url = "...nixpkgs-26.05-darwin"in 13+ flakes. (Replaces this PR's original 20-identical-edits diff.)channels/flake.nixholds the channel once → nixpkgs-26.05-darwin (moves OpenTofu 1.10.9 → 1.11.8).channels.url = "path:./channels"(or../../channels) +nixpkgs.follows = "channels/nixpkgs".inputs, so following a tiny pin flake is the nix-native 'define once, inherit everywhere'.No consumer churn / isolation preserved
?dir=shells/Xinterface is unchanged — no.envrcedits in any of the ~15 consumer repos. Verifiednix develop …?dir=shells/terraform -c tofu version→OpenTofu v1.11.8.templates/*left as standalonenix flake initscaffolds (their pins are intentional examples).Future bumps
One-line edit in
channels/flake.nix+ lockfile-only relocks (Renovate-able) — no more editing the same string in every shell.Verification
nix flake check→ green.?dir=shells/terraform→ tofu 1.11.8;?dir=shells/ansiblebuilds ansible-core 2.21.0 (26.05); ai-dev metadata showsnixpkgs follows channels/nixpkgs.channels/flake.nix.🤖 Generated with Claude Code