Config coturn

This commit is contained in:
Invariantspace 2024-08-31 23:53:22 -07:00
parent 9710cae748
commit b08a27c475
No known key found for this signature in database
GPG key ID: EBC4A20067373921
8 changed files with 122 additions and 88 deletions

View file

@ -0,0 +1,19 @@
{config, ...}: {
services.coturn = with config.constants; let
acmeDir = config.security.acme.certs.${coturn-realm}.directory;
coturn-realm = "turn.${domain}";
in {
enable = true;
cert = "${acmeDir}/fullchain.pem";
listening-port = port.coturn;
min-port = port.coturn-relay-udp-min;
max-port = port.coturn-relay-udp-max;
pkey = "${acmeDir}/key.pem";
realm = coturn-realm;
static-auth-secret-file = config.sops.secrets.coturn.path;
tls-listening-port = port.coturn-tls;
use-auth-secret = true;
};
sops.secrets.coturn = {};
}