Skip to content

Commit

Permalink
nixos/ddclient: fix missing iproute2
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
newAM authored and bjornfor committed Dec 26, 2024
1 parent 28e1cce commit 403dfb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/ddclient.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 403dfb7

Please sign in to comment.