Files
athens/nix/modules/matrix/nginx.nix

65 lines
1.6 KiB
Nix
Raw Normal View History

2025-07-01 15:14:13 -04:00
_:
2021-06-07 21:15:08 -04:00
{
services.nginx = {
enable = true;
virtualHosts = {
"matrix.walkah.chat" = {
forceSSL = true;
enableACME = true;
2025-07-01 15:14:13 -04:00
locations."/_matrix" = {
proxyPass = "http://100.111.208.75:8008";
};
locations."/_synapse/client" = {
2024-12-07 20:46:15 -05:00
proxyPass = "http://100.111.208.75:8008";
};
2021-06-07 21:15:08 -04:00
};
2023-07-09 19:58:59 -04:00
"syncv3.walkah.chat" = {
forceSSL = true;
enableACME = true;
2024-12-07 20:46:15 -05:00
locations."/" = {
proxyPass = "http://100.111.208.75:8088";
};
2023-07-09 19:58:59 -04:00
};
2021-06-07 21:15:08 -04:00
"walkah.chat" = {
forceSSL = true;
enableACME = true;
2023-09-10 14:27:05 -04:00
locations = {
"= /.well-known/matrix/server".extraConfig =
2024-12-07 20:46:15 -05:00
let
server = {
"m.server" = "matrix.walkah.chat:443";
};
2023-09-10 14:27:05 -04:00
in
''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON server}';
'';
"= /.well-known/matrix/client".extraConfig =
let
client = {
2024-12-07 20:46:15 -05:00
"m.homeserver" = {
"base_url" = "https://matrix.walkah.chat";
};
"org.matrix.msc3575.proxy" = {
"url" = "https://syncv3.walkah.chat";
};
2023-09-10 14:27:05 -04:00
};
in
''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';
'';
2025-07-01 15:14:13 -04:00
# "/" = {
# root = pkgs.element-web;
# };
2023-09-10 14:27:05 -04:00
};
2021-06-07 21:15:08 -04:00
};
};
};
}