add reverse-proxy entry for matrix
This commit is contained in:
parent
5238416bf9
commit
6f32149a9a
1 changed files with 23 additions and 0 deletions
|
@ -67,4 +67,27 @@
|
|||
"DATABASE synapse" = "ALL PRIVILEGES";
|
||||
};
|
||||
}];
|
||||
services.nginx.virtualHosts =
|
||||
let
|
||||
listenIPs = (import ../../utils/getInternalIP.nix config).listenIPs;
|
||||
listenStatements = lib.concatStringsSep "\n" (builtins.map (ip: "listen ${ip}:443 http3;") listenIPs) + ''
|
||||
add_header Alt-Svc 'h3=":443"';
|
||||
'';
|
||||
synapse = {
|
||||
listenAddresses = listenIPs;
|
||||
locations."/_matrix" = {
|
||||
proxyPass = "http://localhost:8008";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
"matrix.chir.rs" = synapse // {
|
||||
sslCertificate = "/var/lib/acme/chir.rs/cert.pem";
|
||||
sslCertificateKey = "/var/lib/acme/chir.rs/key.pem";
|
||||
};
|
||||
"matrix.int.chir.rs" = synapse // {
|
||||
sslCertificate = "/var/lib/acme/int.chir.rs/cert.pem";
|
||||
sslCertificateKey = "/var/lib/acme/int.chir.rs/key.pem";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue