The swarm tier is the only holder of the upstream credential, the only writer to the swarm's metrics store, and (once #3283 lands) the place that stamps hive= from the authenticated connection rather than from anything a sender can choose. Today one collector does both tiers' jobs, which works only because they land on one box. A container rather than a second host unit, for two reasons that agree: every sibling swarm service is one, and `services.opentelemetry-collector` is a singleton NixOS option already spoken for on the host by the hive tier. A container gets its own evaluation and therefore its own collector. Port defaults to 4319, deliberately not the OTLP default 4318 the hive tier uses: swarm containers share the host netns, and two listeners claiming one port is not a build failure but a runtime coin toss with nothing in any log saying so -- the same collision grafana and the forge hit on 3000. `url` is an option with a co-located default rather than a loopback literal in the exporter, so a split-host deployment is a config change instead of a code change. Wires nothing yet: the hive tier still exports directly, and switching it over is the next commit.
39 lines
1.2 KiB
Nix
39 lines
1.2 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
|
|
./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
|
|
./swarm-authelia.nix
|
|
./swarm-ca.nix
|
|
./swarm-nats.nix
|
|
./swarm-controller.nix
|
|
./swarm-grafana.nix
|
|
./swarm-otel.nix
|
|
./swarm-snapshot-store.nix
|
|
./swarm-ui.nix
|
|
./swarm-victoriametrics.nix
|
|
./swarm-wireguard.nix
|
|
./swarm.nix
|
|
./swarm-peers-removed.nix
|
|
./swarm-required-services.nix
|
|
];
|
|
}
|