summaryrefslogtreecommitdiff
path: root/config/networking/services/igmpproxy.nix
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2023-03-25 14:00:02 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2023-06-03 10:48:56 +0200
commitc19508ea3a9253eb0b3e3fc8d579a2b07778f3e2 (patch)
tree2a2b8d9f3e524034a0261ab937f6d565febc21cf /config/networking/services/igmpproxy.nix
parentb4c5dd441a3fa3bea8d5df5330dd73ba2bdd64ac (diff)
config: networking: enable sonos
Diffstat (limited to 'config/networking/services/igmpproxy.nix')
-rw-r--r--config/networking/services/igmpproxy.nix17
1 files changed, 17 insertions, 0 deletions
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}";
+ };
+}