docs(#2860): forge.url defaults to null, not a loopback address

The connectivity-overrides section still documented
`hyperhive.forge.url = "http://localhost:3000"` as the default and said
the empty string was a valid value. Both stopped being true when the
option became `nullOr str` with `default = null`.

Also says what `null` means and why, since "the default is null" alone
reads like an oversight rather than the point: a loopback default is
only correct when the forge shares the agent's netns, and the units that
would consume the URL are simply not generated without one.

Refs #2860
This commit is contained in:
atlas 2026-08-01 01:04:33 +02:00 committed by mara
commit f3569160d3

View file

@ -131,8 +131,8 @@ single-host deploy, but are useful for multi-hive or custom-network
setups.
```nix
hyperhive.forge.url = "http://localhost:3000"; # default
hyperhive.matrix.url = "http://localhost:8008"; # default
hyperhive.forge.url = "http://forge.example:3000"; # default: null
hyperhive.matrix.url = "http://localhost:8008"; # default
```
**`hyperhive.forge.url`** — base URL of the Forgejo instance. Used by
@ -141,7 +141,18 @@ directly from the agent's `forge-token`, so `tea` and `hive-forge`
work without an interactive auth step. The unit is a no-op when
`forge-token` is absent. Override when the agent should connect to a
Forgejo on a different host or port (e.g. a swarm peer's forge).
Validated: must be an `http://` or `https://` URL or the empty string.
Validated: must be an `http://` or `https://` URL, or `null`.
**Defaults to `null`, meaning "no forge" — not a guessed address.** A
loopback default would only ever be correct when the forge shares the
agent's network namespace, and inside a container `localhost` is the
agent itself, so the default was a value that built fine and then talked
to the wrong machine. With `null` the `tea-login` and `forge-avatar-sync`
units are not generated at all: an absent integration rather than a
misdirected one. You do not normally set this — hive-c0re renders the
host's real forge URL into every agent, and refuses to write a meta
flake without one, so `null` only survives where the agent modules are
evaluated outside a hive.
**`hyperhive.matrix.url`** — homeserver URL used by
`hive-matrix-daemon` when connecting via the matrix-sdk. Default