allow listening on multiple ports in config

This is a config compatibility break.

The ability to listen on multiple ports, including both TLS and non-TLS,
is necessary for running complement against grapevine.
This commit is contained in:
Benjamin Lee 2024-06-07 19:49:59 -07:00
parent b7ad00ef6e
commit f7d7952f9b
No known key found for this signature in database
GPG key ID: FB9624E2885D55A4
4 changed files with 99 additions and 45 deletions

View file

@ -29,13 +29,6 @@ in
type = types.submodule {
freeformType = format.type;
options = {
address = lib.mkOption {
type = types.nonEmptyStr;
description = ''
The local IP address to bind to.
'';
default = "::1";
};
conduit_compat = lib.mkOption {
type = types.bool;
description = ''
@ -56,12 +49,18 @@ in
then "/var/lib/matrix-conduit"
else "/var/lib/grapevine";
};
port = lib.mkOption {
type = types.port;
listen = lib.mkOption {
type = types.listOf format.type;
description = ''
The local port to bind to.
List of places to listen for incoming connections.
'';
default = 6167;
default = [
{
type = "tcp";
address = "::1";
port = 6167;
}
];
};
};
};