ci: add cache-nix-action for store-path caching across cold runs (#61)#151
Merged
Conversation
Amortise the non-niri half of the desktop closure (Quickshell, Qt6, matugen, DMS, xwayland-satellite, foot and transitive deps) that a fresh GH Actions runner otherwise rebuilds every cold run. Output-cache storage (actions/cache-shaped), orthogonal to the niri.cachix.org substituter trust lines (#59). Keyed on os × arch × flake.lock hash; PR branches restore from the os×arch prefix seeded on main. GC to 5G before save keeps both arch entries under the 10 GB per-repo limit; a 7-day last-accessed purge sweeps dead prefixes without evicting the run's own primary key. cache-nix-action chosen over Cachix/FlakeHub/Attic per the issue's trust-delegation reasoning; revisit only if hit rate stays below ~60% over a month or a second major source-built dep arrives. https://claude.ai/code/session_01R9nbBuTjy2rkiMYJ6NJ1G1
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
Adds a
nix-community/cache-nix-action@v6step to.github/workflows/ci.yaml, betweencachix/install-nix-actionandnix flake check. Closes #61.It amortises the non-niri half of the desktop closure that a fresh GH Actions runner rebuilds on every cold run — Quickshell + Qt6 + matugen + DMS + xwayland-satellite + foot and their transitive deps. This is
actions/cache-shaped storage for build outputs, orthogonal to theniri.cachix.orgsubstituter trust lines added in #59 (those are a substituter; this is not).Key semantics
os × arch × hashFiles('flake.lock')— a lock bump invalidates cleanly.os×archprefix seeded onmain; the squash-auto-merge flow reseeds the cache after each PR lands.5Gbefore save so x86_64 + aarch64 entries coexist under the 10 GB per-repo limit.purge-primary-key: never).Why this and not Cachix/FlakeHub/Attic
Those are larger trust/operational delegations than a one-operator / three-host project warrants today. Per the issue's sequencing:
cache-nix-actionfirst; revisit Cachix/Attic only if hit rate stays below ~60% over a month or a second major source-built dep arrives.magic-nix-cache-actionis excluded (ambiguous post-EOL support status).Verification
purge-primary-key: neverpurge-safety all confirmed. Verdict: approve.actionlintruns as a flake-check pre-commit hook (parts/checks.nix), so CI lints this workflow as part of the gate.Acceptance criteria (#61)
cache-nix-action@v6step betweeninstall-nix-actionandnix flake checkrunner.arch+hashFiles('flake.lock')gc-max-store-size-linux: 5Gflake-check (x86_64-linux)/(aarch64-linux)untouched)https://claude.ai/code/session_01R9nbBuTjy2rkiMYJ6NJ1G1
Generated by Claude Code