feat: self-host Attic binary cache on glyph - #355
Merged
Merged
Conversation
stackptr
enabled auto-merge (squash)
March 10, 2026 21:44
Add atticd service on glyph (port 8199) with SQLite backend, chunked deduplication, and 30-day garbage collection. Expose via cache.zx.dev reverse proxy on spore. Replace Cachix with Attic in CI workflow. - hosts/glyph/services/attic.nix: atticd service config - hosts/spore/services/web: cache.zx.dev nginx virtualHost - .github/workflows/ci.yml: attic login/use/push replaces cachix-action - flake.nix: attic input + cache.zx.dev substituter - lib/hosts.nix: wire atticd NixOS module into host builder - lib/secrets/glyph.nix: register attic-credentials secret Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the Attic cache signing key (main:sbkS1Xz6P4g66iyttRGj/...) to extra-trusted-public-keys so local builds trust artifacts from cache.zx.dev. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
stackptr
force-pushed
the
feat/attic-cache
branch
from
March 10, 2026 22:02
692c57e to
e294586
Compare
This was referenced Mar 11, 2026
Merged
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
cache.zx.devvia reverse proxy on sporeChanges
flake.nixatticinput,cache.zx.devsubstituter, signing public keylib/hosts.nixatticdNixOS module into host builderlib/secrets/glyph.nixattic-credentials.agesecrethosts/glyph/services/attic.nixhosts/glyph/services/default.nixhosts/spore/services/web/default.nixcache.zx.devnginx virtualHost (client_max_body_size 0).github/workflows/ci.ymlcachix-actionwithattic login/use/pushDeployment steps
1. Create the agenix secret
2. Deploy glyph and spore
just switch glyph nixos-rebuild switch --flake .#spore --target-host root@spore --build-host localhost3. Bootstrap the cache (on glyph)
4. Configure GitHub secret
Add the CI token output as
ATTIC_TOKENin repo Settings > Secrets > Actions.Verification
After merging and CI completes a build on main:
Cachix cleanup (after verification)
Once Attic is confirmed working:
CACHIX_AUTH_TOKENGitHub repository secretstackptr.cachix.orgfromextra-substitutersandextra-trusted-public-keysinflake.nixpkgs.cachixfrom devShell inflake.nix🤖 Generated with Claude Code