From 98c53107c3422a6ef34d15117164824cc9185e2a Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Sat, 6 Aug 2022 00:00:21 +0200 Subject: [PATCH] Fix coturn config --- modules/synapse.nix | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/modules/synapse.nix b/modules/synapse.nix index 974011a..7677332 100644 --- a/modules/synapse.nix +++ b/modules/synapse.nix @@ -193,21 +193,20 @@ in ''; }; - networking.firewall = { - interfaces.enp2s0 = - let - range = with config.services.coturn; [{ - from = min-port; - to = max-port; - }]; - in - { - allowedUDPPortRanges = range; - allowedUDPPorts = [ 3478 ]; - allowedTCPPortRanges = range; - allowedTCPPorts = [ 3478 ]; - }; - }; + networking.firewall = + let + range = with config.services.coturn; [{ + from = min-port; + to = max-port; + }]; + in + { + allowedUDPPortRanges = range; + allowedUDPPorts = [ 3478 ]; + allowedTCPPortRanges = range; + allowedTCPPorts = [ 3478 ]; + }; + security.acme.certs.${config.services.coturn.realm} = { postRun = "systemctl restart coturn.service";