update coturn to help it launch on startup

This commit is contained in:
naturallaw77 2023-06-19 14:25:50 -07:00
parent e18c7d1c83
commit 7ed68722b5

View File

@ -2,9 +2,36 @@
let let
personalization = import ./personalization.nix; personalization = import ./personalization.nix;
in in
{ {
systemd.services.sslcoturn = {
script = ''
systemctl restart coturn
'';
unitConfig = {
Type = "simple";
After = "NetworkManager.service";
Requires = "network-online.target";
};
serviceConfig = {
emainAfterExit = "yes";
Type = "oneshot";
};
wantedBy = [ "multi-user.target" ];
};
services.coturn = { services.coturn = {
enable = true; enable = true;
use-auth-secret = true; use-auth-secret = true;
static-auth-secret = "${personalization.age.secrets.turn.file}"; static-auth-secret = "${personalization.age.secrets.turn.file}";
@ -14,10 +41,11 @@ let
min-port = 49152; min-port = 49152;
max-port = 65535; max-port = 65535;
no-cli = true; no-cli = true;
#listening-ips = [ "127.0.0.1" ];
extraConfig = '' extraConfig = ''
verbose verbose
external-ip=${personalization.external_ip_secret} external-ip=${personalization.external_ip_secret}
''; '';
}; };
} }