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.

authored by

Alex Martens and committed by
Bjørn Forsman
403dfb7c 28e1cce5

+1 -1
+1 -1
nixos/modules/services/networking/ddclient.nix
··· 222 222 wantedBy = [ "multi-user.target" ]; 223 223 after = [ "network.target" ]; 224 224 restartTriggers = lib.optional (cfg.configFile != null) cfg.configFile; 225 - path = lib.optional (lib.hasPrefix "if," cfg.use || lib.hasPrefix "if," cfg.usev4 || lib.hasPrefix "if," cfg.usev6) pkgs.iproute2; 225 + path = lib.optional (lib.hasPrefix "if," cfg.use || lib.hasPrefix "ifv4," cfg.usev4 || lib.hasPrefix "ifv6," cfg.usev6) pkgs.iproute2; 226 226 227 227 serviceConfig = { 228 228 DynamicUser = true;