2024-09-17 10:14:33 +02:00
|
|
|
{ pkgs, lib, config, ... }:
|
|
|
|
{
|
|
|
|
sops.secrets."coturn/static-auth-secret" = {
|
|
|
|
sopsFile = ../../../.secrets/hetzner/coturn.yaml; # bring your own password file
|
2024-09-17 10:30:12 +02:00
|
|
|
restartUnits = [ "coturn.service" ];
|
|
|
|
owner = "turnserver";
|
2024-09-17 10:14:33 +02:00
|
|
|
};
|
|
|
|
|
2024-09-17 10:19:55 +02:00
|
|
|
services.coturn = {
|
2024-09-17 10:14:33 +02:00
|
|
|
enable = true;
|
2024-09-17 10:19:55 +02:00
|
|
|
realm = config.services.nextcloud.hostName;
|
2024-09-17 10:14:33 +02:00
|
|
|
static-auth-secret-file = config.sops.secrets."coturn/static-auth-secret".path;
|
|
|
|
use-auth-secret = true;
|
|
|
|
lt-cred-mech = true;
|
|
|
|
cert = "/var/lib/acme/hoyer.xyz/fullchain.pem";
|
|
|
|
pkey = "/var/lib/acme/hoyer.xyz/key.pem";
|
|
|
|
extraConfig = ''
|
|
|
|
fingerprint
|
|
|
|
total-quota=100
|
|
|
|
bps-capacity=0
|
|
|
|
stale-nonce=600
|
|
|
|
cipher-list="ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384"
|
|
|
|
no-loopback-peers
|
|
|
|
no-multicast-peers
|
|
|
|
no-tlsv1
|
|
|
|
no-tlsv1_1
|
|
|
|
no-stdout-log
|
|
|
|
syslog
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|