💬 matrix-synapse server
This commit is contained in:
26
modules/matrix/nginx.nix
Normal file
26
modules/matrix/nginx.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"matrix.walkah.chat" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = { proxyPass = "http://plato:8008"; };
|
||||
};
|
||||
|
||||
"walkah.chat" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."= /.well-known/matrix/server".extraConfig =
|
||||
let server = { "m.server" = "matrix.walkah.chat:443"; };
|
||||
in ''
|
||||
add_header Content-Type application/json;
|
||||
return 200 '${builtins.toJSON server}';
|
||||
'';
|
||||
locations."/" = { root = pkgs.element-web; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user