hippocampus: matrix client/server prep
This commit is contained in:
31
machines/hippocampus/servers/public/matrix/server.nix
Normal file
31
machines/hippocampus/servers/public/matrix/server.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
services.matrix-tuwunel = {
|
||||
enable = true;
|
||||
stateDirectory = "tuwunel";
|
||||
# Must be equal to whatever reverse proxy is used for the unix
|
||||
# socket path to work
|
||||
group = config.services.caddy.group;
|
||||
settings = {
|
||||
global = {
|
||||
address = null;
|
||||
unix_socket_path = "/run/tuwunel/tuwunel.sock";
|
||||
server_name = "glia.club";
|
||||
allow_federation = false;
|
||||
allow_encryption = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts = {
|
||||
"glia.club, glia.club:8448" = {
|
||||
extraConfig = let
|
||||
proxy = "unix/${config.services.matrix-tuwunel.settings.global.unix_socket_path}";
|
||||
in ''
|
||||
reverse_proxy /_matrix/* ${proxy}
|
||||
reverse_proxy /_tuwunel/* ${proxy}
|
||||
reverse_proxy /.well-known/matrix/client ${proxy}
|
||||
reverse_proxy /.well-known/matrix/server ${proxy}
|
||||
reverse_proxy /.well-known/matrix/support ${proxy}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user