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 {
|
maxRequestSize = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.ints.positive;
|
||||||
default = "20000000";
|
default = 20000000;
|
||||||
description = ''
|
description = ''
|
||||||
Maximum size in bytes of a single matrix client request body.
|
Maximum size in bytes of a single matrix client request body.
|
||||||
Default 20 MB matches the matrix-spec recommendation for
|
Default 20 MB matches the matrix-spec recommendation for
|
||||||
media uploads. String-typed to match tuwunel's TOML config
|
media uploads + the upstream tuwunel default.
|
||||||
shape (it accepts both integer + size-with-suffix strings).
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -170,8 +169,11 @@ in
|
||||||
package = cfg.package;
|
package = cfg.package;
|
||||||
settings.global = {
|
settings.global = {
|
||||||
server_name = effectiveServerName;
|
server_name = effectiveServerName;
|
||||||
address = "0.0.0.0";
|
# `address` is `listOf nonEmptyStr` upstream (multi-bind
|
||||||
port = cfg.httpPort;
|
# 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;
|
max_request_size = cfg.maxRequestSize;
|
||||||
# Federation enabled at the protocol level so swarms
|
# Federation enabled at the protocol level so swarms
|
||||||
# can be wired up later by extending `trustedServers`
|
# can be wired up later by extending `trustedServers`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue