68 lines
No EOL
1.5 KiB
Nix
68 lines
No EOL
1.5 KiB
Nix
let
|
|
net = import ../network.nix;
|
|
services = import ../services.nix;
|
|
in
|
|
[
|
|
{
|
|
type = "proxy";
|
|
domain = net.devices.remote_proxy.domain;
|
|
endpoint = "/_matrix/";
|
|
force_ssl = true;
|
|
port = 443;
|
|
content = {
|
|
type = "service";
|
|
ip = net.devices.pi.ip;
|
|
port = services.continuwuity.port;
|
|
proxyWebsockets = true;
|
|
};
|
|
}
|
|
{
|
|
type = "proxy";
|
|
domain = net.devices.remote_proxy.domain;
|
|
endpoint = "/_matrix/";
|
|
force_ssl = true;
|
|
port = 8448;
|
|
content = {
|
|
type = "service";
|
|
ip = net.devices.pi.ip;
|
|
port = services.continuwuity.port;
|
|
proxyWebsockets = true;
|
|
};
|
|
}
|
|
{
|
|
type = "inline";
|
|
domain = net.devices.remote_proxy.domain;
|
|
endpoint = "/.well-known/matrix/server";
|
|
force_ssl = true;
|
|
port = 443;
|
|
content = {
|
|
contentType = "application/json";
|
|
status = 200;
|
|
body = ''{"m.server":"${net.devices.remote_proxy.domain}:443"}'';
|
|
};
|
|
}
|
|
{
|
|
type = "inline";
|
|
domain = net.devices.remote_proxy.domain;
|
|
endpoint = "/.well-known/matrix/client";
|
|
force_ssl = true;
|
|
port = 443;
|
|
content = {
|
|
contentType = "application/json";
|
|
status = 200;
|
|
body = ''
|
|
{
|
|
"m.homeserver": {
|
|
"base_url": "https://${net.devices.remote_proxy.domain}"
|
|
},
|
|
"org.matrix.msc4143.rtc_foci": [
|
|
{
|
|
"type": "livekit",
|
|
"livekit_service_url": "https://livekit.${net.devices.remote_proxy.domain}"
|
|
}
|
|
]
|
|
}
|
|
'';
|
|
};
|
|
}
|
|
] |