hive-matrix: fix tuwunel option types (address/port lists, max_request_size int)

This commit is contained in:
damocles 2026-05-29 02:48:50 +02:00
commit dfb2595a50

View file

@ -119,13 +119,12 @@ in
};
maxRequestSize = lib.mkOption {
type = lib.types.str;
default = "20000000";
type = lib.types.ints.positive;
default = 20000000;
description = ''
Maximum size in bytes of a single matrix client request body.
Default 20 MB matches the matrix-spec recommendation for
media uploads. String-typed to match tuwunel's TOML config
shape (it accepts both integer + size-with-suffix strings).
media uploads + the upstream tuwunel default.
'';
};
};
@ -170,8 +169,11 @@ in
package = cfg.package;
settings.global = {
server_name = effectiveServerName;
address = "0.0.0.0";
port = cfg.httpPort;
# `address` is `listOf nonEmptyStr` upstream (multi-bind
# support). Single-host bind goes through as a one-element list.
address = [ "0.0.0.0" ];
# `port` is `listOf port` upstream. Same shape.
port = [ cfg.httpPort ];
max_request_size = cfg.maxRequestSize;
# Federation enabled at the protocol level so swarms
# can be wired up later by extending `trustedServers`