fixed element-calling

This commit is contained in:
2026-03-24 18:57:32 -05:00
parent f78f3e4740
commit 35189ab232

View File

@@ -6,38 +6,36 @@ in
lib.mkIf config.sovran_systemsOS.features.element-calling { lib.mkIf config.sovran_systemsOS.features.element-calling {
systemd.tmpfiles.rules = [
"d /var/lib/domains/element-calling 0750 caddy php -"
];
####### CADDY CONFIGS ####### ####### CADDY CONFIGS #######
"${personalization.matrix_url}" = lib.mkForce { services.caddy.virtualHosts = lib.mkForce {
extraConfig = '' "${personalization.matrix_url}" = {
reverse_proxy /_matrix/* http://localhost:8008 extraConfig = ''
reverse_proxy /_synapse/client/* http://localhost:8008 reverse_proxy /_matrix/* http://localhost:8008
header /.well-known/matrix/* Content-Type "application/json" reverse_proxy /_synapse/client/* http://localhost:8008
header /.well-known/matrix/* Access-Control-Allow-Origin "*" header /.well-known/matrix/* Content-Type "application/json"
header /.well-known/matrix/* Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" header /.well-known/matrix/* Access-Control-Allow-Origin "*"
header /.well-known/matrix/* Access-Control-Allow-Headers "X-Requested-With, Content-Type, Authorization" header /.well-known/matrix/* Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
respond /.well-known/matrix/client `{ "m.homeserver": {"base_url": "https://${personalization.matrix_url}" }, "org.matrix.msc4143.rtc_foci": [{ "type":"livekit", "livekit_service_url":"https://${personalization.element-calling_url}/livekit/jwt" }] }` header /.well-known/matrix/* Access-Control-Allow-Headers "X-Requested-With, Content-Type, Authorization"
''; respond /.well-known/matrix/client `{ "m.homeserver": {"base_url": "https://${personalization.matrix_url}" }, "org.matrix.msc4143.rtc_foci": [{ "type":"livekit", "livekit_service_url":"https://${personalization.element-calling_url}/livekit/jwt" }] }`
}; '';
};
"${personalization.element-calling_url}" = lib.mkForce { "${personalization.element-calling_url}" = {
extraConfig = '' extraConfig = ''
handle /livekit/jwt/sfu/get { handle /livekit/jwt/sfu/get {
uri strip_prefix /livekit/jwt uri strip_prefix /livekit/jwt
reverse_proxy [::1]:8073 { reverse_proxy [::1]:8073 {
header_up Host {host} header_up Host {host}
header_up X-Forwarded-Server {host} header_up X-Forwarded-Server {host}
header_up X-Real-IP {remote_host} header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host} header_up X-Forwarded-For {remote_host}
}
} }
} handle {
handle { reverse_proxy localhost:7880
reverse_proxy localhost:7880 }
} '';
''; };
}; };
####### LIVEKIT SERVICE ####### ####### LIVEKIT SERVICE #######