matrix works

This commit is contained in:
twoneis 2025-02-19 20:44:06 +01:00
parent caba7f3420
commit 6820f4dbe1

View file

@ -3,14 +3,34 @@
inherit (lib) mkIf; inherit (lib) mkIf;
in mkIf conf.matrix.enable { in mkIf conf.matrix.enable {
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"twoneis.site" = {
serverName = "twoneis.site";
useACMEHost = "twoneis.site";
forceSSL = true;
locations = {
"/.well-known/matrix/server" = {
return = "200 '{\"m.server\": \"matrix.twoneis.site:443\"}'";
};
};
};
"matrix.twoneis.site" = { "matrix.twoneis.site" = {
listen = [
{
addr = "95.111.239.134";
port = 443;
ssl = true;
} {
addr = "95.111.239.134";
port = 8448;
ssl = true;
}
];
serverName = "matrix.twoneis.site"; serverName = "matrix.twoneis.site";
forceSSL = true; forceSSL = true;
useACMEHost = "twoneis.site"; useACMEHost = "twoneis.site";
locations = { locations = {
"/" = { "/" = {
recommendedProxySettings = true; proxyPass = "http://localhost:6167";
proxyPass = "http://127.0.0.1:6167";
}; };
}; };
}; };