From 923302af1d259d3e769f01957bfb8fee254299db Mon Sep 17 00:00:00 2001 From: Jimbo Date: Tue, 10 Sep 2024 15:10:58 -0400 Subject: [PATCH] Separate the synapse and coturn services --- nixos/server/coturn.nix | 10 ++++++++++ nixos/server/synapse.nix | 8 -------- 2 files changed, 10 insertions(+), 8 deletions(-) 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; };