hive-matrix: fix tuwunel option types (address/port lists, max_request_size int)
This commit is contained in:
parent
c580b7ce6d
commit
dfb2595a50
1 changed files with 8 additions and 6 deletions
|
|
@ -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`
|
||||
|
|
|
|||
Loading…
Reference in a new issue