From c19508ea3a9253eb0b3e3fc8d579a2b07778f3e2 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sat, 25 Mar 2023 14:00:02 +0100 Subject: config: networking: enable sonos --- config/networking/services/igmpproxy.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 config/networking/services/igmpproxy.nix (limited to 'config/networking/services/igmpproxy.nix') diff --git a/config/networking/services/igmpproxy.nix b/config/networking/services/igmpproxy.nix new file mode 100644 index 0000000..3d7fb9c --- /dev/null +++ b/config/networking/services/igmpproxy.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +let nets = config.personal.networking.networks; + conf = pkgs.writeText "igmpproxy.conf" '' + phyint ${nets.wan.interface} upstream ratelimit 0 threshold 1 + phyint ${nets.iot.interface} downstream ratelimit 0 threshold 1 + phyint ${nets.lan.interface} downstream ratelimit 0 threshold 1 + ''; +in { + systemd.services.igmpproxy = { + description = "Multicast router utilizing IGMP forwarding"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + path = [ pkgs.igmpproxy ]; + script = "igmpproxy -vv -n ${conf}"; + }; +} -- cgit v1.2.3