Generic NixOS module that wraps services.inadyn to keep a Cloudflare
zone's A records pointed at the host's current public IP. One API token
updates the zone root plus any extra hostnames.
Does not manage secrets — pass a runtime path to a Zone:DNS:Edit token
(agenix, sops, etc.).
| option | type | default | note |
|---|---|---|---|
enable |
bool | false |
|
domain |
str | — | Cloudflare zone name; also the inadyn username |
extraHostnames |
[str] | [] |
extra records; *.example.com covers all subs |
apiTokenFile |
path | — | runtime path to a Zone:DNS:Edit token |
ttl |
int | 1 |
1 = automatic on Cloudflare |
proxied |
bool | false |
orange-cloud |
updatePeriod |
int | 300 |
inadyn check interval, seconds |
inputs.cloudflare-ddns.url = "github:mccartykim/cloudflare-ddns-flake";
# in a host config:
imports = [ inputs.cloudflare-ddns.nixosModules.default ];
services.cloudflareDdns = {
enable = true;
domain = "example.com";
extraHostnames = [ "*.example.com" ];
apiTokenFile = config.age.secrets.cloudflare-token.path;
};flake.nix, module.nix. That's it.