Add conduit

This commit is contained in:
Tristan Daniël Maat 2022-06-09 22:40:00 +01:00
parent 3e200c896a
commit 40682e946f
Signed by: tlater
GPG key ID: 49670FD774E43268
2 changed files with 51 additions and 1 deletions

View file

@ -7,6 +7,7 @@
./services/nextcloud.nix
./services/webserver.nix
./services/starbound.nix
./services/conduit.nix
./ids.nix
];
@ -38,7 +39,7 @@
useDHCP = false;
interfaces.eth0.useDHCP = true;
firewall.allowedTCPPorts = [ 80 443 2222 2221 25565 21025 ];
firewall.allowedTCPPorts = [ 80 443 2222 2221 8448 25565 21025 ];
};
time.timeZone = "Europe/London";

View file

@ -0,0 +1,49 @@
{
config,
lib,
...
}: let
inherit (lib.lists) flatten;
domain = config.services.nginx.domain;
server_name = "matrix.${domain}";
in {
services.matrix-conduit = {
enable = true;
settings.global = {
inherit server_name;
address = "127.0.0.1";
database_backend = "rocksdb";
};
};
services.nginx = {
virtualHosts."${server_name}" = {
listen = flatten (map (port: [
{
inherit port;
addr = "0.0.0.0";
ssl = true;
}
{
inherit port;
addr = "[::0]";
ssl = true;
}
]) [443 8448]);
locations."/_matrix/" = {
proxyPass = "http://127.0.0.1:6167";
extraConfig = ''
proxy_buffering off;
'';
};
onlySSL = true;
enableACME = true;
extraConfig = ''
merge_slashes off;
'';
};
};
}