35 lines
665 B
Nix
35 lines
665 B
Nix
{...}: let
|
|
port = 6167;
|
|
address = "127.0.0.1";
|
|
domain = "matrix.spoodythe.one";
|
|
mb = 1024 * 1024;
|
|
max-request-size = 20;
|
|
in {
|
|
imports = [
|
|
./nginx.nix
|
|
];
|
|
|
|
services.conduwuit = {
|
|
enable = true;
|
|
settings = {
|
|
global = {
|
|
inherit port;
|
|
inherit address;
|
|
server_name = domain;
|
|
max_request_size = max-request-size * mb;
|
|
};
|
|
};
|
|
};
|
|
|
|
services.nginx.virtualHosts."${domain}" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/" = {
|
|
proxyPass = "http://${address}:${toString port}";
|
|
extraConfig = ''
|
|
client_max_body_size ${max-request-size}M;
|
|
'';
|
|
};
|
|
};
|
|
}
|