Watch
0
0
Fork
You've already forked hyperhive
0

fix(nix): require swarm domain only when a hyperhive service is enabled

The swarm.domain assertion in hive-network.nix fired on every host that
imported the module, so a host that enables nothing failed eval. It now
fires only when one of the hyperhive service switches is on (every
deploy.*.enable that runs something, gateway, gateway.dns, network,
otel, snapshotStore). The requirement itself is unchanged: any host that
runs a hyperhive service still needs swarm.domain.

The core-toggle module-eval suite gains a case: a missing swarm.domain is
refused on a hive and on a swarm-service-only host, and a host enabling
nothing passes every assertion.

Closes #4887
This commit is contained in:
atlas 2026-10-02 13:09:45 +02:00
commit fb2fff0668
4 changed files with 71 additions and 13 deletions

View file

@ -310,8 +310,9 @@ services.hyperhive = {
<!-- vale write-good.Passive = NO -->
Swarm options are identical on every host in the swarm, so `swarm.domain` is
**required** on every host; `hiveName` is required on a host that runs a
hive, the secret store or the homeserver. Eval fails with a hint naming
**required** on every host that runs any hyperhive service; a host that
imports the module and enables nothing evaluates without it. `hiveName` is
required on a host that runs a hive, the secret store or the homeserver. Eval fails with a hint naming
each. Neither defaults, because a guessed value here is a wrong hostname
that evaluates cleanly and deploys.