2023-06-01 05:47:05 -07:00
|
|
|
{config, pkgs, lib, ...}:
|
|
|
|
|
|
|
|
let
|
|
|
|
personalization = import ./personalization.nix;
|
|
|
|
in
|
|
|
|
{
|
2023-06-18 20:14:09 -07:00
|
|
|
services.coturn = {
|
2023-06-01 05:47:05 -07:00
|
|
|
enable = true;
|
|
|
|
use-auth-secret = true;
|
2023-06-03 16:09:28 -07:00
|
|
|
static-auth-secret = "${personalization.age.secrets.turn.file}";
|
2023-06-01 05:47:05 -07:00
|
|
|
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;
|
|
|
|
no-cli = true;
|
|
|
|
#listening-ips = [ "127.0.0.1" ];
|
|
|
|
extraConfig = ''
|
|
|
|
verbose
|
|
|
|
external-ip=${personalization.external_ip_secret}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|