feat(cachix): auto-push tower/leod builds to soft-nix cache#150
Merged
Conversation
This was referenced May 29, 2026
Wires the upstream services.cachix-watch-store NixOS module via a new flake module so local builds on tower and leod push freshly-built store paths to soft-nix.cachix.org. aaron is intentionally out of scope (see plans/cachix-push-from-aaron.md): Determinate Nix already owns the post-build-hook on darwin. Per-host write tokens limit blast radius if one machine is compromised. The committed .age files are placeholders to keep CI green; replace each with a real cachix write token via \`agenix -e\` before deploying.
Lateral SSH between machines is unrestricted, so a per-host token does not meaningfully reduce blast radius — compromising tower lets the attacker read leod's secret too. Single shared token is simpler.
The previous extraction was overkill for a single attribute set, and the applicability matches nixos-workstation exactly: tower and leod use it, aaron uses the cross-platform workstation module, pi is not a workstation.
Statix flagged repeated `services` keys after inlining cachix-watch-store. Merge the three sibling assignments into one attribute set. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
156a060 to
83f1950
Compare
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
etrobert
approved these changes
May 30, 2026
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.
Summary
services.cachix-watch-storeinsidemodules/nixos-workstation.nixso local builds on tower and leod automatically push freshly-built store paths to soft-nix.cachix.org. CI already does this; this extends the same behavior to interactive builds.cachix-token.ageencrypted for both hosts. Per-host tokens were rejected because lateral SSH between machines is unrestricted — compromising one host already gives access to the other.nixos-workstationrather than a separate module: applicability matches exactly (tower + leod), and one services block isn't worth its own file.post-build-hookslot on darwin. Seeplans/cachix-push-from-aaron.md(local) for the deferred plan.Before merging
The committed
cachix-token.ageis a placeholder (encrypted "replace with real token" string). It keeps CI green but won't decrypt to a usable cachix token. Steps to finish:Writescope).agenix -e secrets/cachix-token.age— paste the token.cachix-watch-store-agentsystemd service will start and begin pushing.Test plan
nix flake check --all-systems --no-buildpassessystemctl status cachix-watch-store-agentshows running on both hostsnix build nixpkgs#hello --rebuild); confirm new path on the soft-nix dashboard