summaryrefslogtreecommitdiff
path: root/config/networking/services/ifplugd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'config/networking/services/ifplugd.nix')
-rw-r--r--config/networking/services/ifplugd.nix12
1 files changed, 4 insertions, 8 deletions
diff --git a/config/networking/services/ifplugd.nix b/config/networking/services/ifplugd.nix
index 4933b97..b904e90 100644
--- a/config/networking/services/ifplugd.nix
+++ b/config/networking/services/ifplugd.nix
@@ -1,12 +1,8 @@
-{
- config,
- pkgs,
- ...
-}: let
- iface = config.personal.networking.networks.eth0.device;
+{pkgs, ...}: let
+ iface = "enp3s0";
dhcpService = "kea-dhcp4-server.service";
action = pkgs.writeShellApplication {
- name = "ifplugd-enp3s0.action";
+ name = "ifplugd-${iface}.action";
runtimeInputs = [pkgs.systemd];
text = ''
INTERFACE="$1"
@@ -30,7 +26,7 @@ in {
script = ''
# iface no-daemon no-auto no-shutdown delay-up run
ifplugd -i ${iface} -n -a -q -u 5 -r \
- ${action}/bin/ifplugd-enp3s0.action
+ ${action}/bin/ifplugd-${iface}.action
'';
path = [pkgs.busybox];
};