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
Parent spike: #1769. Research the 2026 best practice for publishing Nix outputs (binary caches, flake distribution) and decide what devkit manages for consumers.
Motivation / why
devkit pushes its own closures to Cachix (nix-cachix.yml, blocking push on the trusted release path in release.yml), but consumers whose flakes export packages have no lane: users rebuild from source, and CI caches are ad hoc.
Proposed approach (strawman)
Managed opt-in: push release closures to a declared cache after build; cache choice evaluated (Cachix, FlakeHub Cache, self-hosted attic, Magic Nix Cache for CI-only).
Evaluate FlakeHub flake publishing (flakehub-push, semver flake refs) as the "registry" analogue for flakes.
Round-1 specialist review (fresh context, research only). Verified 2026-09-29 against primary sources; claims the reviewer could not verify are marked UNVERIFIED. Consolidated verdict: #1769.
Verdict
Reclassify: this is CI infrastructure, not a release-train publish channel. The cache only saves bandwidth and never affects release correctness; a github: flake ref works with an empty cache. Recommendations:
Keep Cachix for the trusted release cache.
Add nix-community/cache-nix-action for per-repo CI caching.
Skip FlakeHub flake publishing. It is lock-in (flakehub.com/f/... URLs spread through consumers' repos), and github:owner/repo/<tag> refs against train tags already work.
Options
Cachix: long-lived token only, no OIDC as of Sep 2026. Standard substituter, so leaving costs little.
FlakeHub Cache: OIDC, paid per member, no ad-hoc push, no self-hosting.
attic: self-hosted and active, but its docs still call it a prototype.
Magic Nix Cache:deprecated 2025-02-01; do not adopt.
Trust model
Use two caches:
<org>-ci: untrusted; PRs push here; short retention.
<org>-release: written only by the tag-protected trusted job, the same shape as devkit's blocking push in release.yml.
Consumers read from the release cache through nixConfig.extra-substituters / extra-trusted-public-keys. Use per-repo write tokens and no shared write key.
Split
Managed: a release cache-push workflow (idempotent cachix push of the closure, run in the pre-publish window) and the CI-cache seed.
Seeded: the nixConfig substituter and key block in the flake template.
Repo: the flake outputs and the cache/token registration.
New pitfalls
nixConfig substituters need accept-flake-config or the user's trust; otherwise Nix silently rebuilds from source.
Same-repo PRs can poison the cache too, not only forks.
Spike complete. The dated verdict is in the review above; the cross-cutting decision is recorded in docs/rfcs/ADR-publish-lanes.md (PR #1785, merged to dev as 36e74cc), per #1769's rule that the channel spikes close when the ADR lands.
Activity
gerchowl commentedon Sep 29, 2026
Verdict
Reclassify: this is CI infrastructure, not a release-train publish channel. The cache only saves bandwidth and never affects release correctness; a
github:flake ref works with an empty cache. Recommendations:nix-community/cache-nix-actionfor per-repo CI caching.flakehub.com/f/...URLs spread through consumers' repos), andgithub:owner/repo/<tag>refs against train tags already work.Options
Trust model
Use two caches:
<org>-ci: untrusted; PRs push here; short retention.<org>-release: written only by the tag-protected trusted job, the same shape as devkit's blocking push inrelease.yml.Consumers read from the release cache through
nixConfig.extra-substituters/extra-trusted-public-keys. Use per-repo write tokens and no shared write key.Split
cachix pushof the closure, run in the pre-publish window) and the CI-cache seed.nixConfigsubstituter and key block in the flake template.New pitfalls
nixConfigsubstituters needaccept-flake-configor the user's trust; otherwise Nix silently rebuilds from source.Sources: Cachix security · cachix-action · FlakeHub Cache · attic · Magic Nix Cache deprecation · cache-nix-action · Tweag untrusted CI
docs(rfcs): record turnkey publish-lane ADR (#1785)
c-vigo commentedon Sep 30, 2026
Spike complete. The dated verdict is in the review above; the cross-cutting decision is recorded in
docs/rfcs/ADR-publish-lanes.md(PR #1785, merged todevas 36e74cc), per #1769's rule that the channel spikes close when the ADR lands.Implementation continues in: #1784 (Nix cache) (lane foundation: #1778).