diff --git a/nixos/server/coturn.nix b/nixos/server/coturn.nix index 316c0a6..abb109e 100644 --- a/nixos/server/coturn.nix +++ b/nixos/server/coturn.nix @@ -13,6 +13,16 @@ pkey = "/var/lib/acme/turn.${outputs.secrets.jimDomain}.com/key.pem"; }; + # Enable coturn on Synapse + matrix-synapse.settings = { + turn_uris = [ + "turn:turn.${outputs.secrets.jimDomain}:3478?transport=udp" + "turn:turn.${outputs.secrets.jimDomain}:3478?transport=tcp" + ]; + turn_shared_secret = static-auth-secret; + turn_user_lifetime = "1h"; + }; + # Proxy main coturn port nginx.virtualHosts."turn.${outputs.secrets.jimDomain}" = { enableACME = true; diff --git a/nixos/server/synapse.nix b/nixos/server/synapse.nix index 7ff6a95..71cb5bc 100644 --- a/nixos/server/synapse.nix +++ b/nixos/server/synapse.nix @@ -57,14 +57,6 @@ max_upload_size = "50M"; report_stats = false; - # Turn settings - turn_uris = [ - "turn:turn.${outputs.secrets.jimDomain}:3478?transport=udp" - "turn:turn.${outputs.secrets.jimDomain}:3478?transport=tcp" - ]; - turn_shared_secret = static-auth-secret; - turn_user_lifetime = "1h"; - # Ratelimiting burst_count = 15; };