Nix-native substitution
Nix still handles derivations, closures, NAR files, store identities, and substitute selection.
Getting started
On this page
j / k move between sections.
Docs / Adapter commands / Nix
Give Nix a runner-local binary-cache endpoint while Nix continues to handle derivations, closures, NAR files, substitution, and signatures.
Nix still handles derivations, closures, NAR files, store identities, and substitute selection.
The post-build hook queues completed output paths; a bounded worker batches publication and drains before the adapter exits.
Global signature checks stay enabled; trust is limited to the loopback store used for the invocation.
Install Nix first, keep the cache tag in .boringcache.toml, then wrap the ordinary Nix command. The adapter adds a loopback substituter and drains completed outputs before it exits. Global Nix signature checks remain enabled.
[adapters.nix] tag = "nix-cache" # Run: boringcache nix -- nix build .
The Action starts the Nix adapter for later steps. Nix must already be installed on the Linux or macOS runner.
- uses: boringcache/one@1781572d7b3ec5aef652f8ba479b981439b2776b # v1.48.2 with: trust-policy: auto mode: nix - run: nix build .
Approve the repository through Connect CI and grant the job contents: read and id-token: write. The Action uses that Machine connection. Pull requests restore by default; trusted jobs may publish. See the authentication example in the GitHub Actions reference for scoped credentials when OIDC is unavailable.
Zed builds the same upstream commits with BoringCache and Cachix on the same runner classes.
Nix
Benchmark →Code editor written in Rust.
Average restore, build and save · lower is better
4 vCPU · 16 GB · Ubuntu 24.04 x86-64
Builds of one commit can land on different CPU models. These ratios use only the build pairs where both caches ran on the same model; above 1.00× means BoringCache's total time over those pairs was lower.
Each table is one workflow run with one build per cache. A row marked Different CPU ran on another CPU model than BoringCache at the same level, so part of its time difference can come from the hardware.
| Cache | Cold | Warm | CPU |
|---|---|---|---|
| BoringCache Binary cache | 1 h 8 min | 4 min 19 s | Cold: AMD EPYC 9V45 · Warm: AMD EPYC 7763 |
| Cachix | 1 h 41 min | 4 min 1 s | Intel Xeon Platinum 8573C Different CPU |
4 vCPU · 16 GB · Ubuntu 24.04 x86-64
AMD EPYC 9R45
BoringCache · GitHub runner · 4 vCPU
96.2% of 179,564 lookups over 30 builds
Check the tool's own reference when you need cache-key rules, build settings, or version-specific behavior.
Compare every supported command, protocol, and Action mode in one place.
Adapter command index →Need help or found something unclear? Open an issue or browse the CLI repo.
We use cookies to understand how people use BoringCache. Privacy policy