Skip to content

refactor(flakes): define the nixpkgs channel once in channels/ (26.05 + DRY)#40

Open
JacobPEvans-personal wants to merge 1 commit into
mainfrom
fix/nixpkgs-26.05
Open

refactor(flakes): define the nixpkgs channel once in channels/ (26.05 + DRY)#40
JacobPEvans-personal wants to merge 1 commit into
mainfrom
fix/nixpkgs-26.05

Conversation

@JacobPEvans-personal
Copy link
Copy Markdown
Member

@JacobPEvans-personal JacobPEvans-personal commented May 31, 2026

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.)

  • New channels/flake.nix holds the channel once → nixpkgs-26.05-darwin (moves OpenTofu 1.10.9 → 1.11.8).
  • Root flake + all 13 shells + 3 test fixtures declare channels.url = "path:./channels" (or ../../channels) + nixpkgs.follows = "channels/nixpkgs".
  • nix forbids variables in inputs, so following a tiny pin flake is the nix-native 'define once, inherit everywhere'.

No consumer churn / isolation preserved

  • The ?dir=shells/X interface is unchanged — no .envrc edits in any of the ~15 consumer repos. Verified nix develop …?dir=shells/terraform -c tofu versionOpenTofu v1.11.8.
  • mkShell shell locks stay ~2 input nodes (channels + nixpkgs), not the root's full devenv tree.
  • templates/* left as standalone nix flake init scaffolds (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/ansible builds ansible-core 2.21.0 (26.05); ai-dev metadata shows nixpkgs follows channels/nixpkgs.
  • Channel literal now appears in exactly one tracked file: channels/flake.nix.

🤖 Generated with Claude Code

…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
@JacobPEvans-personal JacobPEvans-personal changed the title chore(deps): bump nixpkgs 25.11-darwin → 26.05-darwin refactor(flakes): define the nixpkgs channel once in channels/ (26.05 + DRY) Jun 1, 2026
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.

1 participant