Compare commits

...
Author SHA1 Message Date
atlas
3be7a211d0 docs(3202): state the file's scope positively
Per mara's review: "describe what is, not what is not."

The header said "the swarm services' vhosts are NOT here", which
describes the file by its absences and dates immediately — the list of
what is missing grows every time a service is added, while the list of
what the file holds does not.

Reworded to say what it is: the hive's own gateway surface (the `_`
default server and the vhost named for the hive domain), with the scope
line stating where a swarm service's vhost lives rather than where it
doesn't.
2026-08-14 09:52:44 +02:00
atlas
6aabca9ecb docs(3202): vhosts.nix's header described the file before the split
The header still announced "the forge, matrix and authelia sub-domain
vhosts" and an "Accept-header SPA map". None of the three is true:

- the four swarm vhosts moved into their own service modules, so the
  header named contents that are no longer in the file;
- `_` is described as serving the dashboard and per-agent routing, but
  it is now a bare 444 catch-all — that surface moved to the vhost
  named for the hive domain;
- the "Accept-header SPA map" is not merely gone, it is the mechanism
  the file's own dashboard comment argues *against* ("routing is by
  PATH, never content-type"), 140 lines below the header claiming it.

A file's opening comment is its orientation text — the first thing read
and the last thing checked — so a stale one costs more than a stale
line in the body. Rewritten to describe what the file holds now, and to
name the property the split established: a service owns its whole
gateway surface in its own module, and a service name appearing here is
the signal that the coupling is growing back.
2026-08-14 02:51:19 +02:00

View file

@ -1,9 +1,17 @@
# nginx virtual-host tree for the gateway: the `_` default server
# (dashboard, per-agent routing, matrix discovery), the forge, matrix
# and authelia sub-domain vhosts, and the Accept-header SPA map for the
# matrix GUI. Pure function — called from ./default.nix with the
# outer-scope config values as arguments; returns
# `{ virtualHosts }`.
# nginx virtual-host tree for the **hive's own** gateway surface: the `_`
# default server, which answers unmatched `Host` with a bare 444, and the
# vhost named for the hive domain, which carries the dashboard, per-agent
# routing, matrix discovery, the swagger UI and the legacy
# `<hive>/matrix/*` redirect.
#
# Scope: a swarm service declares its own vhost and dns name in its own
# module, built from the kit this file also consumes
# (`services.hyperhive.gateway.lib`, ./vhost-lib.nix). That keeps a
# service's gateway surface next to the service, and keeps this file to
# the surface the hive itself serves.
#
# Pure function — called from ./default.nix with the outer-scope config
# values as arguments; returns `{ virtualHosts }`.
{
lib,
cfg, # services.hyperhive.gateway