nix: declare the Cachix cache in the flake and document the tagged-release caveat#1564
Conversation
…lease caveat Add a nixConfig block exposing kixelated.cachix.org as an extra-substituter plus trusted public key, so `nix run ... --accept-flake-config` consults the binary cache without a manual nix.conf edit or a prior `cachix use`. The cache only holds tagged releases: cachix.yml fires on moq-relay-v* and sibling tags and pins the last 10 revisions per package+OS. An unpinned github:moq-dev/moq#moq-relay tracks the default branch HEAD, which is never cached and compiles from source. Spell that out in the flake comment and the Linux setup doc, and show the pin-to-a-tag pattern in both. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR enables Cachix-backed binary caching for the moq project's Nix flake. The 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Makes
nix run github:moq-dev/moq#moq-relayactually benefit from our Cachix cache, and documents the one caveat that previously bit consumers silently: only tagged releases are cached.flake.nix: added anixConfigblock declaringkixelated.cachix.orgas anextra-substituters+extra-trusted-public-keys. With it,nix run ... --accept-flake-configconsults the binary cache automatically, no manualnix.confedit or priorcachix userequired. The old comment is replaced with one that spells out the tagged-releases-only behavior and the pin-to-a-tag pattern.doc/setup/linux.md: the Nix bullet previously just said "use the binary cache to skip building from source." It now notes that only tagged releases are pushed, shows the pinned--accept-flake-configcommand, and warns that the unpinned form tracks the default branch and compiles from source.Why
cachix.ymlonly fires onmoq-relay-v*/moq-cli-v*/ sibling tags and pins the last 10 revisions per package+OS. So a plainnix run github:moq-dev/moq#moq-relayresolves to the default-branch HEAD, which is never in the cache and falls back to building from source even when the substituter is configured. To get a cache hit you have to pin the flake ref to a recent tag:Reviewer notes
--accept-flake-configis required because Nix won't silently apply substituters from an untrusted flake.cachix use kixelated(once) is the permanent alternative; both are documented.v0.12.4(current latest), which will go stale as new releases are tagged. Open to a follow-up that tracks "latest stable" instead of a pinned version if you'd prefer doc examples not need a bump each release.main.(Written by Claude)