The matrix homeserver: implementation notes

What the homeserver's NixOS module does that an operator never sees: the hive-side code it replaced, the evaluation assertions it makes, and the fluffychat-web build fixes. The operator's view of the homeserver is in the swarm matrix page.

Retired hive-side matrix code

Earlier versions of hive-c0re created a private "hive" Matrix Space and a hive-chat room, invited every agent to both, kept the hive's sender token on disk and offered hivectl matrix invite. Matrix is swarm-level, so hive-c0re dropped all of it and no longer talks to the homeserver. The Space, the room and the files /var/lib/hyperhive/matrix/{access-token,space-room-id,chat-room-id} are harmless leftovers, so delete them by hand if you like.

Assertion rationale

config.assertions in this module fail eval early rather than ship surprising behaviour:

server_name's own bogus-value guard lives in hive-network.nix (services.hyperhive.domain != null), not here — see docs/4-implementation/networking/network.md.

fluffychat-web build fixes

pkgs.fluffychat-web ships from flutter341.buildFlutterApplication, which has two upstream gaps for fluffychat's web target:

Both fixed in nix/host-modules/hive-matrix.nix via two derivations:

Two subtle details worth knowing before touching either derivation:

Drop both derivations when nixpkgs's flutter builder grows worker

Mount point is chat.<swarm-domain>/ (the gatewayHost vhost); upstream --base-href "/" is correct at sub-domain root, no override.