hyperhive/nix/host-modules/default.nix
atlas 0e5eb1e8d6 glue-matrix-bao-token: the store's first reader
Fetches an opaque 32-byte value and writes it where hive-matrix.nix
already looks, so the homeserver never learns the store exists.

Chosen over authelia's OIDC secret deliberately: that one needs a
.secret AND a matching .digest, so shipping it first would debug 'can a
reader authenticate and get bytes back' and 'did we write authelia's
file format right' at once, with an SSO outage as the failure mode. Here
the failure is narrow -- new agent accounts cannot be provisioned,
existing ones untouched.

Every failure path keeps the local token: no such key, sealed store,
unreachable store, empty value. The activation script's mint-if-absent
is untouched, so a hive with no store behaves exactly as it does today.

matrixMachine is a literal because hive-matrix.nix declares no `machine`
option -- `matrixCfg.machine` parses cleanly and fails at module-system
resolution, which is the kind of error only reading the target module
catches.
2026-08-30 19:01:10 +02:00

44 lines
1.3 KiB
Nix

# The full hyperhive host stack, pulled together in one place — this
# is what the flake exports as `nixosModules.default` (wrapped with
# the package/source wiring; see flake.nix). One import covers
# everything; `services.hyperhive.enable = true` turns the stack on.
#
# The forge is mandatory — hive-c0re mirrors every agent's applied
# config repo into it and it's the canonical store for the meta flake
# + `internal/*` repos, so there's no enable toggle; it deploys with
# hyperhive itself. hive-matrix is opt-in (off by default). All
# subsystems rely on `services.hyperhive.domain`, which is required
# (asserted in hive-network.nix) whenever hyperhive is enabled.
{
imports = [
./hyperhive.nix
./deploy.nix
./local-defaults.nix
./hive-c0re
./hive-ci.nix
./hive-forge
./hive-gateway
./hive-matrix.nix
./hive-network.nix
./hive-priv.nix
./hive-tls.nix
./otel.nix
./glue-bao-tls.nix
./glue-matrix-bao-token.nix
./swarm-authelia.nix
./swarm-bao.nix
./swarm-ca.nix
./swarm-nats.nix
./swarm-controller.nix
./swarm-grafana.nix
./swarm-otel.nix
./swarm-snapshot-store.nix
./swarm-ui.nix
./swarm-victorialogs.nix
./swarm-victoriametrics.nix
./swarm-wireguard.nix
./swarm.nix
./swarm-peers-removed.nix
./swarm-required-services.nix
];
}