You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implementation of the Nix lane for the publish-lane spike #1769 (review on #1776). Per that review it is CI infrastructure, not a DEVKIT_PUBLISH channel: a seeded CI cache plus an opt-in trusted release-cache push.
Problem Statement
Consumer flakes that export packages have no binary cache, so users rebuild from source and CI caching is ad hoc. devkit's own two-tier setup (the trusted blocking Cachix push in release.yml, plus nix-cachix.yml) is not available to consumers.
Proposed Solution
Seeded CI cache:nix-community/cache-nix-action with GC settings (per repo, untrusted).
Managed release-cache push (opt-in .vig-os flag): an idempotent cachix push of the release closure in the pre-publish window, written only by the tag-protected trusted job, with per-repo write tokens.
Seeded: a nixConfig.extra-substituters / extra-trusted-public-keys block in the flake template; document accept-flake-config.
Not adopted: FlakeHub flake publishing (lock-in; github: refs against train tags suffice), and Magic Nix Cache (deprecated 2025-02-01).
Alternatives Considered
FlakeHub Cache (OIDC, but paid per member and no ad-hoc push); attic (self-hosted, still labelled a prototype).
Additional Context
Cachix has no OIDC as of Sep 2026, so a token is unavoidable. Same-repo PRs can poison a shared writable cache, so separate the CI and release caches. The 5 GiB OSS tier needs pinning and GC.
Impact
Nix consumers get substitutable releases and faster CI.
Two points for this design, from running crane-based Rust repos with self-hosted runners:
Push the crane intermediates, not just the dev shell. The expensive, reusable paths are cargoArtifacts (the buildDepsOnly output) and the check derivations. If only the dev-shell closure reaches the cache, every runner still rebuilds the dependency graph. Pushing buildDepsOnly outputs from trusted branches (main/dev) gives PR builds a warm start without ever giving them a token, which fits security(ci): managed ci.yml passes the Cachix push token to same-repo pull_request runs (cache poisoning) #1881.
Leave room for a self-hosted backend. Teams with their own build hosts often run Attic, with server-side signing and LRU GC. If the push step is written against a small interface (substituter URL + public key + a push command from secrets), a non-Cachix backend becomes configuration rather than a fork. One operational note on Attic: with the default SQLite backend, highly parallel pushes contend on the write lock. Push with low parallelism (-j 2) or use Postgres.
Activity
docs(rfcs): record turnkey publish-lane ADR (#1785)
DerDennisOP commentedon Oct 1, 2026
Hey! You might want to look into Gradient: https://wavelens.github.io/gradient/ :)
gerchowl commentedon Oct 14, 2026
Two points for this design, from running crane-based Rust repos with self-hosted runners:
cargoArtifacts(thebuildDepsOnlyoutput) and the check derivations. If only the dev-shell closure reaches the cache, every runner still rebuilds the dependency graph. PushingbuildDepsOnlyoutputs from trusted branches (main/dev) gives PR builds a warm start without ever giving them a token, which fits security(ci): managed ci.yml passes the Cachix push token to same-repo pull_request runs (cache poisoning) #1881.-j 2) or use Postgres.fix(toolchain): release-lane cache parity, bounded realisation, fail-…