Fixes the 502 Bad Gateway on http://nix-cache after today's lxc-nix-cache rebuild.
.sops.yaml's &lxc-nix-cache anchor was rotated in b3c8145 (after the rebuild), but secrets/nix-cache.yaml was never re-run through sops updatekeys -- it stayed encrypted for the pre-rotation key.
Per docs/nix-cache.md/docs/auto-installer.md, sops-nix decrypt failures are silent: cache-priv-key never materialized on the box, nix-serve had no secretKeyFile to bind to and failed to start, and nginx's proxy_pass had a dead upstream -- hence 502 from nginx (as opposed to the earlier "unreachable" state, which was network-level, not this).
Verified the new key is correct by deriving the age identity from host-keys/lxc-nix-cache_ssh_host_ed25519_key.pub via ssh-to-age and comparing to .sops.yaml -- matches.
Checked secrets/common.yaml and secrets/server.yaml against their .sops.yaml creation_rules too -- both already consistent, only nix-cache.yaml had drifted.
Test plan
Merge and pull onto whatever redeploys/rebuilds lxc-nix-cache (or nixos-rebuild switch on the box itself, done manually by the operator per repo safety rules).
curl http://nix-cache/nix-cache-info returns 200, not 502.
sudo systemctl status nix-serve on nix-cache is active.
## Summary
- Fixes the 502 Bad Gateway on `http://nix-cache` after today's `lxc-nix-cache` rebuild.
- `.sops.yaml`'s `&lxc-nix-cache` anchor was rotated in `b3c8145` (after the rebuild), but `secrets/nix-cache.yaml` was never re-run through `sops updatekeys` -- it stayed encrypted for the pre-rotation key.
- Per `docs/nix-cache.md`/`docs/auto-installer.md`, sops-nix decrypt failures are silent: `cache-priv-key` never materialized on the box, `nix-serve` had no `secretKeyFile` to bind to and failed to start, and nginx's `proxy_pass` had a dead upstream -- hence 502 from nginx (as opposed to the earlier "unreachable" state, which was network-level, not this).
- Verified the new key is correct by deriving the age identity from `host-keys/lxc-nix-cache_ssh_host_ed25519_key.pub` via `ssh-to-age` and comparing to `.sops.yaml` -- matches.
- Checked `secrets/common.yaml` and `secrets/server.yaml` against their `.sops.yaml` creation_rules too -- both already consistent, only `nix-cache.yaml` had drifted.
## Test plan
- [ ] Merge and pull onto whatever redeploys/rebuilds `lxc-nix-cache` (or `nixos-rebuild switch` on the box itself, done manually by the operator per repo safety rules).
- [ ] `curl http://nix-cache/nix-cache-info` returns 200, not 502.
- [ ] `sudo systemctl status nix-serve` on `nix-cache` is active.
.sops.yaml's &lxc-nix-cache anchor was rotated (commit b3c8145) after
today's LXC rebuild, but secrets/nix-cache.yaml was never re-run through
sops updatekeys -- it stayed encrypted for the pre-rotation key. Per
docs/nix-cache.md and docs/auto-installer.md, sops-nix decrypt failures
are silent: cache-priv-key never materialized, nix-serve had nothing to
bind its secretKeyFile to and failed to start, and nginx proxy_pass had
no upstream -- the 502 Bad Gateway seen from clients.
Confirmed the new key matches the currently-deployed host by deriving
the age identity from host-keys/lxc-nix-cache_ssh_host_ed25519_key.pub
via ssh-to-age and comparing to .sops.yaml.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
http://nix-cacheafter today'slxc-nix-cacherebuild..sops.yaml's&lxc-nix-cacheanchor was rotated inb3c8145(after the rebuild), butsecrets/nix-cache.yamlwas never re-run throughsops updatekeys-- it stayed encrypted for the pre-rotation key.docs/nix-cache.md/docs/auto-installer.md, sops-nix decrypt failures are silent:cache-priv-keynever materialized on the box,nix-servehad nosecretKeyFileto bind to and failed to start, and nginx'sproxy_passhad a dead upstream -- hence 502 from nginx (as opposed to the earlier "unreachable" state, which was network-level, not this).host-keys/lxc-nix-cache_ssh_host_ed25519_key.pubviassh-to-ageand comparing to.sops.yaml-- matches.secrets/common.yamlandsecrets/server.yamlagainst their.sops.yamlcreation_rules too -- both already consistent, onlynix-cache.yamlhad drifted.Test plan
lxc-nix-cache(ornixos-rebuild switchon the box itself, done manually by the operator per repo safety rules).curl http://nix-cache/nix-cache-inforeturns 200, not 502.sudo systemctl status nix-serveonnix-cacheis active.