From 010d0a422aacf5ea7f7947c1e4c70e9f26556e2e Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 5 Jun 2026 18:27:51 +0200 Subject: [PATCH] docs(matrix): document trustedServers and maxRequestSize options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The matrix.md provisioning section mentioned trustedServers in passing ("wired up later by extending trustedServers") but never explained it as a configurable option, and maxRequestSize was undocumented entirely. Add a "Configuration tuning" subsection before "Assertion rationale": - trustedServers (default []) — list of peer homeserver names to trust; federation is protocol-on but no peer trusted until listed; link to swarm.md for the multi-hive use case. - maxRequestSize (default 20 MB) — request body limit matching the matrix-spec recommendation; when and why to raise or lower it. --- docs/matrix.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/matrix.md b/docs/matrix.md index 9d16aeac..023862ea 100644 --- a/docs/matrix.md +++ b/docs/matrix.md @@ -141,6 +141,29 @@ purges and is reused on re-provision. considered already created. Delete the file to force re-creation (e.g. after a homeserver wipe). +## Configuration tuning + +```nix +services.hyperhive.matrix = { + trustedServers = [ "matrix.org" "example.com" ]; # default: [] + maxRequestSize = 20000000; # default: 20 MB +}; +``` + +**`trustedServers`** (default `[]`) — list of peer homeserver names +whose signing keys tuwunel will fetch and trust. Federation is enabled +at the protocol level from first boot (`allow_federation = true`) but +no remote homeserver is trusted until listed here. For a closed +single-hive deployment the default empty list is correct — add peer +hive domains here when connecting hives into a swarm (see +[`docs/swarm.md`](swarm.md)). + +**`maxRequestSize`** (default `20_000_000` bytes = 20 MB) — maximum +size of a single matrix client request body. Matches the matrix-spec +recommendation for media uploads and the upstream tuwunel default. +Raise for deployments that need large file transfers; lower for +resource-constrained hosts where a 20 MB request is unexpectedly large. + ## Assertion rationale Two `config.assertions` entries fail eval early rather than ship