Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix/host-modules/hive-gateway
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 34e142bb5c hive-matrix: run the homeserver in its own netns, behind a unix socket
tuwunel bound `0.0.0.0:<httpPort>` in the host netns, so the homeserver
port was open on every host address, and the gateway proxied to it on
host loopback.

The container now sets `privateNetwork = true` and hangs off the hive
bridge with a DHCP lease, the same attach the CI runner, builder and
review classifier use (resolvconf on, `networking.nameservers` the bridge
IP). tuwunel listens only on `/run/hive-matrix/tuwunel.sock`, a host
directory (root:nginx 0770) bind-mounted into the container; its primary
group is nginx's gid and the socket is 0660. The gateway's `/_matrix/`
location proxies to the socket.

The static resolv.conf goes: it existed because resolvconf's host
tracking came up empty in the shared netns.

`swarm.matrix.httpPort` and `{swarm,deploy}.matrix.openFirewall` are
removed with a message: there is no host port to choose or open. The
`.well-known/matrix/*` fallback to `<hive>:<httpPort>` is dropped with
them; it only rendered with `gatewayHost = null`, which the homeserver's
SSO assertion already rejects.

Part of #4815.
2026-10-15 09:52:06 +02:00
..
default.nix swarm CA: retire the host-held root CA, the store holds the only anchor 2026-10-05 21:17:10 +02:00
dns.nix swarm-otel: ship the whole host journal, drop user sessions after it 2026-09-30 23:01:49 +02:00
dnsmasq.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
error-pages.nix nix(authelia): start with a disabled placeholder user when the user set is empty 2026-10-02 12:50:47 +02:00
options.nix swarm CA: describe the store's pki root as the only anchor in docs and comments 2026-10-05 21:17:10 +02:00
vhost-lib.nix hive-tls: no hive leaf or hive identity on a gateway host without a hive 2026-10-04 19:45:14 +02:00
vhosts.nix hive-matrix: run the homeserver in its own netns, behind a unix socket 2026-10-15 09:52:06 +02:00