The ddclient service will fail to discover an IPv4 address with the following error message:
Aug 20 14:27:10 nixrt ddclient[135978]: FAILED: Unable to obtain default route information -- missing ip or ifconfig command
Aug 20 14:27:10 nixrt ddclient[135978]: WARNING: mydomain.com: unable to determine IPv4 address with strategy usev4=ifv4
services.ddclient = {
enable = true;
interval = "5min";
# IP discovery
usev4 = "ifv4";
usev6 = ""; # disable IPv6 (AAAA) record
extraConfig = ''
ifv4=wan0
'';
# A record
zone = "mydomain.com";
domains = ["mydomain.com"];
# Cloudflare API
protocol = "cloudflare";
username = "token";
passwordFile = "${config.sops.secrets."cloudflare/api-token".path}";
};
I believe the issue is that the systemd service path is not including pkgs.iproute2. My workaround is to add this:
systemd.services.ddclient.path = [pkgs.iproute2];
We can see in the service derivation that this path is optional, but the condition is too restrictive.
Describe the bug
The
ddclient
service will fail to discover an IPv4 address with the following error message:I believe the issue is that the systemd service path is not including
pkgs.iproute2
. My workaround is to add this:We can see in the service derivation that this path is optional, but the condition is too restrictive.
https://github.com/NixOS/nixpkgs/blob/d2f3b99a6b7b74a6fecaac280d88ecb4b5b28c5a/nixos/modules/services/networking/ddclient.nix#L230
Steps To Reproduce
wan0
with an existing WAN interface.journalctl -u ddclient
to see the failure.Expected behavior
The service should succeed to discover and IPv4 address, like it does after I apply my workaround.
Notify maintainers
@bjornfor
Metadata
Add a :+1: reaction to issues you find important.