Skip to content

feat(nix): de-duplicate the flake into the toolchain SSoT - #651

Merged
c-vigo merged 5 commits into
feature/625-nix-claude-migrationfrom
feature/631-flake-ssot
Jun 23, 2026
Merged

c-vigo merged 5 commits into
feature/625-nix-claude-migrationfrom
feature/631-flake-ssot

Conversation

@c-vigo

@c-vigo c-vigo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements T1.1 (#631) — collapses the flake dev-shell and the (future) image tool list into a single devTools source of truth and lays the reusable flake outputs the rest of the Nix track depends on.

What changed

How claude is provided

claude is the claude-code package from nixpkgs (binary claude, via meta.mainProgram). It is a fast-mover, so it is sourced from nixpkgs-unstable through overlays.default (unstable 2.1.x vs stable 1.0.85). No custom fetch/overlay-from-scratch needed — it is packaged cleanly in nixpkgs.

Note: nixpkgs freeze is an EDR-bypass payload toolkit (optiv/Freeze), not the charmbracelet terminal-screenshot tool #545 intended. Used charm-freeze (binary freeze) instead.

Evaluator choice + rationale

Upstream CppNix via cachix/install-nix-action (SHA-pinned v31.10.6). It is the most broadly supported installer, pairs natively with cachix/cachix-action, and needs no extra infra. The flake is installer-agnostic — swapping to the Lix lix-installer or the Determinate installer requires zero flake changes, so this decision is cheaply reversible.

Cachix wiring

  • cachix/install-nix-action@…v31.10.6 (flakes enabled) → cachix/cachix-action@…v17 with name: ${{ vars.CACHIX_CACHE }} and authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} (token never printed/hardcoded).
  • Builds nix develop --profile dev-profile and pushes nix path-info -r ./dev-profile | cachix push.
  • Non-blocking: standalone workflow (not a required check) + continue-on-error: true → existing CI is unaffected.
  • Adds workflow_dispatch plus a push trigger on the epic branch for on-branch validation.
  • Actions are SHA-pinned per check-action-pins policy.

Verification (local, against the public vig-os cache)

  • nix flake check → all checks passed (devShellTools shows only a benign "unknown flake output" warning).
  • tests/test_flake_devshell.py → 2 passed — every one of the 23 tools runs inside nix develop (incl. claude --version, nvim --version, rg --version, freeze --version, tmux -V, expect -v).
  • just precommit → all hooks pass (incl. check-action-pins, agent-identity, yamllint).

TDD trail

  • test(nix): failing parity test committed first (RED).
  • feat(nix): flake SSoT + outputs making it pass (GREEN).
  • ci(nix): non-blocking Cachix workflow.

Refs: #631

c-vigo added 4 commits June 23, 2026 11:35
Factor a single devTools list as the source of truth shared by the dev-shell
now and the image later. Absorb the #545 agent-CLI toolkit (rg, fd, bat, eza,
delta, lazygit, zoxide, starship, freeze, expect, neovim, claude). Pin nixpkgs
to nixos-25.05 and overlay fast-movers (uv, gh, claude-code) from
nixpkgs-unstable. Add reusable lib.mkProjectShell, overlays.default and a
packages.devcontainerImage stub, and refresh flake.lock.

Refs: #631
Build the flake dev-shell and push its closure to the vig-os Cachix cache via
cachix/install-nix-action (upstream CppNix) + cachix/cachix-action. The job is
a standalone, non-required workflow with continue-on-error so it never affects
the existing CI gate, and adds workflow_dispatch for on-branch validation.

Refs: #631
@c-vigo
c-vigo marked this pull request as ready for review June 23, 2026 09:51
@c-vigo
c-vigo merged commit 87e3286 into feature/625-nix-claude-migration Jun 23, 2026
9 checks passed
@c-vigo
c-vigo deleted the feature/631-flake-ssot branch June 23, 2026 09:53
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