Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix/host-modules/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 2f05e2db28 nix: re-run the host's store fetches on a ten-minute timer
Seven host oneshots fetch a secret from the swarm secret store into a file
their consumer loads at start: swarm-bao-grafana-oidc, swarm-bao-otel-oidc,
swarm-bao-matrix-oidc, swarm-bao-ci-runner, swarm-bao-forge-oidc,
swarm-bao-hive-otel-oidc and swarm-bao-forwarder-oidc. Each was
RemainAfterExit with no timer, so it ran at boot or deploy and never again:
a secret re-minted in the store reached its consumer only through an
operator restarting the fetch.

lib/store-refresh-timer.nix gives each one a timer (OnUnitInactiveSec 10min,
RandomizedDelaySec 1min, the agent's own store re-read interval), and each
drops RemainAfterExit so a timer start is not a no-op. Each script already
writes the file only when secret_differs, and refresh_consumer/refresh_unit
restart the consumer only when the file is newer than its last start, so a
run reading an unchanged value restarts nothing.

Two docs said these units do not run on a timer; credentials.md's
ci-runner row said the runner token is not re-pulled.

Part of #5017 (slice T).
2026-10-13 00:03:20 +02:00
..
atomic-write-secret.nix lint: tighten atomic-write-secret.nix's header comment; fix vale contractions in persistence.md 2026-09-26 21:50:03 +02:00
bao-pki-dir.nix swarm-nats: the auth responder's store identity path is its own, not the hive's 2026-10-06 10:04:30 +02:00
hive-ca-trust.nix swarm CA: describe the store's pki root as the only anchor in docs and comments 2026-10-05 21:17:10 +02:00
name-guards.nix swarm: refuse swarm.hives keys that are not valid hive identifiers 2026-10-12 21:45:50 +02:00
refresh-consumer.nix hive telemetry collector: fetch its OIDC secret from the store under the hive's own leaf 2026-10-10 01:10:31 +02:00
store-refresh-timer.nix nix: re-run the host's store fetches on a ten-minute timer 2026-10-13 00:03:20 +02:00
store-retry.nix credential units: restart consumers on a changed credential; fix the ordering claim 2026-09-30 07:45:47 +02:00