From 403dfb7c93a0aab6b2f8912ab613504725ef8e83 Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Thu, 26 Dec 2024 10:31:23 -0800 Subject: [PATCH] nixos/ddclient: fix missing iproute2 When obtaining the IP address from an interface iproute2 is missing: "Unable to obtain information for 'bond-wan' -- missing ip or ifconfig command" The prefix check to include iproute2 is incorrect for "usev4" and "usev6". Currently the NixOS module checks for the "if" prefix. This prefix is not valid with "usev4" and "usev6": "Invalid Value for keyword 'usev4' = 'if'" "ifv4" must be used with "usev4", and "ifv6" with "usev6". I updated the nixos module to check for the correct prefix with "usev4" and "usev6", and include iproute2 as necessary. --- nixos/modules/services/networking/ddclient.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/ddclient.nix b/nixos/modules/services/networking/ddclient.nix index bd78d6eef1280..31c85770ee596 100644 --- a/nixos/modules/services/networking/ddclient.nix +++ b/nixos/modules/services/networking/ddclient.nix @@ -222,7 +222,7 @@ in wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; restartTriggers = lib.optional (cfg.configFile != null) cfg.configFile; - path = lib.optional (lib.hasPrefix "if," cfg.use || lib.hasPrefix "if," cfg.usev4 || lib.hasPrefix "if," cfg.usev6) pkgs.iproute2; + path = lib.optional (lib.hasPrefix "if," cfg.use || lib.hasPrefix "ifv4," cfg.usev4 || lib.hasPrefix "ifv6," cfg.usev6) pkgs.iproute2; serviceConfig = { DynamicUser = true;