Remove coturn, never used, Mumble better anyway

This commit is contained in:
Jimbo 2025-03-04 16:50:55 -05:00
parent ba985e92c3
commit 881ba32e58
5 changed files with 5 additions and 80 deletions

View file

@ -1,46 +0,0 @@
{ config, lib, ... }:
{
imports = [ ./nginx ];
config = lib.mkIf config.services.matrix-synapse.enable {
services = {
coturn = {
enable = true;
no-cli = true;
no-tcp-relay = true;
min-port = 49000;
max-port = 50000;
use-auth-secret = true;
static-auth-secret = config.secrets.coturnSecret;
realm = "turn.jimbosfiles.com";
cert = "/var/lib/acme/turn.jimbosfiles.com/fullchain.pem";
pkey = "/var/lib/acme/turn.jimbosfiles.com/key.pem";
};
# Enable coturn on Synapse
matrix-synapse.settings = {
turn_uris = [
"turn:turn.jimbosfiles.com:3478?transport=udp"
"turn:turn.jimbosfiles.com:3478?transport=tcp"
];
turn_shared_secret = config.secrets.coturnSecret;
turn_user_lifetime = "1h";
};
# Sync the IP to Cloudflare
cloudflare-dyndns.domains = [ "turn.jimbosfiles.com" ];
};
# Open coturn ports
networking.firewall = {
allowedUDPPorts = [
3478
5349
];
allowedUDPPortRanges = [{
from = config.services.coturn.min-port;
to = config.services.coturn.max-port;
}];
};
};
}

View file

@ -1,22 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkIf config.services.coturn.enable {
services.nginx.virtualHosts."turn.jimbosfiles.com" = {
enableACME = true;
forceSSL = true;
listen = [{
addr = "0.0.0.0";
port = 80;
ssl = false;
}];
locations."/".proxyPass = "http://127.0.0.1:1380";
};
security.acme.certs = {
"turn.jimbosfiles.com" = {
group = "turnserver";
postRun = "systemctl restart coturn.service";
};
};
};
}

View file

@ -1,7 +1,6 @@
{ ... }:
{
imports = [
./coturn
./element
./synapse
];

View file

@ -7,16 +7,10 @@
locations = {
"/.well-known/matrix/client".extraConfig = ''
default_type application/json;
return 200 '
{
"m.homeserver": {
"base_url": "https://matrix.jimbosfiles.com"
},
"m.identity_server": {
"base_url": "https://matrix.org"
}
}
';
return 200 '{
"m.homeserver": { "base_url": "https://matrix.jimbosfiles.com" },
"m.identity_server": { "base_url": "https://matrix.org" }
}';
'';
"/.well-known/matrix/server".extraConfig = ''
default_type application/json;