diff options
Diffstat (limited to 'config/networking')
| -rw-r--r-- | config/networking/services/dhcp.nix | 4 | ||||
| -rw-r--r-- | config/networking/services/igmpproxy.nix | 21 |
2 files changed, 17 insertions, 8 deletions
diff --git a/config/networking/services/dhcp.nix b/config/networking/services/dhcp.nix index 956416e..1958f28 100644 --- a/config/networking/services/dhcp.nix +++ b/config/networking/services/dhcp.nix @@ -44,4 +44,8 @@ in { }) subnets; }; }; + + systemd.services.kea-dhcp4-server.after = + builtins.map (subnet: "${subnet.interface}-netdev.service") + (with nets; [ wan iot ]); } diff --git a/config/networking/services/igmpproxy.nix b/config/networking/services/igmpproxy.nix index 3d7fb9c..6bfb43b 100644 --- a/config/networking/services/igmpproxy.nix +++ b/config/networking/services/igmpproxy.nix @@ -1,17 +1,22 @@ { 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 - ''; +let + nets = config.personal.networking.networks; + nets-dependencies = + builtins.map (subnet: "${subnet.interface}-netdev.service") + (with nets; [ wan iot ]); + 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" ]; + after = [ "network.target" ] ++ nets-dependencies; + requires = nets-dependencies; path = [ pkgs.igmpproxy ]; - script = "igmpproxy -vv -n ${conf}"; + script = "igmpproxy -v -n ${conf}"; }; } |
