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

@ -1,24 +1,19 @@
{config, ...}: {
services = with config.constants; {
coturn = {
enable = true;
realm = localhost;
static-auth-secret-file = config.sops.secrets.coturn.path;
use-auth-secret = true;
};
matrix-conduit = {
enable = true;
settings.global = {
address = wildcard;
port = port.conduit;
turn_secret = "TbbL8a4tsv6HkR9esjkPa4$fTKX";
turn_uris = [
"turn:${localhost}?transport=udp"
"turn:${localhost}?transport=tcp"
];
server_name = domain;
};
services.matrix-conduit = with config.constants; {
enable = true;
settings.global = {
address = wildcard;
port = port.conduit;
# Use secret file when possible
turn_secret = "84EoJSEVnlH@eiqqV7K!2vmAr^G";
turn_uris = let
coturn-realm = "turn.${domain}";
in [
"turn:${coturn-realm}:${toString port.coturn-tls}?transport=udp"
"turn:${coturn-realm}:${toString port.coturn-tls}?transport=tcp"
];
turn_user_lifetime = "1h";
server_name = domain;
};
};
sops.secrets.coturn = {};
}