From 6aabca9ecb998d8f22372734f2985efc9b7552fa Mon Sep 17 00:00:00 2001 From: atlas Date: Fri, 14 Aug 2026 02:51:19 +0200 Subject: [PATCH] docs(3202): vhosts.nix's header described the file before the split MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- nix/host-modules/hive-gateway/vhosts.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/nix/host-modules/hive-gateway/vhosts.nix b/nix/host-modules/hive-gateway/vhosts.nix index ee855739..5f74f059 100644 --- a/nix/host-modules/hive-gateway/vhosts.nix +++ b/nix/host-modules/hive-gateway/vhosts.nix @@ -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 gateway: the `_` default server — +# now only a catch-all that rejects — and the hive's own domain, which +# carries the dashboard, per-agent routing, matrix discovery and the +# swagger UI. +# +# ⚠️ The swarm services' vhosts are NOT here. Forge, matrix and authelia +# each declare their own, built from the same kit this file consumes +# (`services.hyperhive.gateway.lib`, ./vhost-lib.nix), so a service owns +# its whole gateway surface — vhost and dns name — inside its own +# module. A service name appearing in this file is the signal that the +# coupling is growing back. +# +# Pure function — called from ./default.nix with the outer-scope config +# values as arguments; returns `{ virtualHosts }`. { lib, cfg, # services.hyperhive.gateway