diff --git a/modules/coturn.nix b/modules/coturn.nix index 8748d57..8f93da9 100755 --- a/modules/coturn.nix +++ b/modules/coturn.nix @@ -34,16 +34,19 @@ let enable = true; use-auth-secret = true; - static-auth-secret = "${personalization.age.secrets.turn.file}"; + static-auth-secret = "${personalization.coturn_static_auth_secret}"; realm = personalization.matrix_url; cert = "/var/lib/coturn/${personalization.matrix_url}.crt.pem"; pkey = "/var/lib/coturn/${personalization.matrix_url}.key.pem"; min-port = 49152; max-port = 65535; + listing-port = 5349; no-cli = true; extraConfig = '' verbose external-ip=${personalization.external_ip_secret} + stale-nonce + fingerprint ''; }; diff --git a/modules/personalization.nix b/modules/personalization.nix index 120c7ed..ee22d1f 100755 --- a/modules/personalization.nix +++ b/modules/personalization.nix @@ -13,7 +13,6 @@ age.identityPaths = [ "/root/.ssh/agenix/agenix-secret-keys" ]; ## -age.secrets.turn.file = /var/lib/agenix-secrets/turn.age; age.secrets.matrix_reg_secret.file = /var/lib/agenix-secrets/matrix_reg_secret.age; age.secrets.matrixdb.file = /var/lib/agenix-secrets/matrixdb.age; age.secrets.nextclouddb.file = /var/lib/agenix-secrets/nextclouddb.age; @@ -22,5 +21,6 @@ age.secrets.wordpressdb.file = /var/lib/agenix-secrets/wordpressdb.age; ## external_ip_secret = builtins.readFile /var/lib/secrets/external_ip; +coturn_static_auth_secret = builtins.readFile /var/lib/secrets/turn; }