Skip to content

ddns-updater

Dynamic DNS updater

Example

nix
{config, ...}: {
  nps.stacks.ddns-updater = {
    enable = true;
    settings = [
      {
        provider = "duckdns";
        domain = "example.duckdns.org";
        token = "{{ file.Read `${config.sops.secrets."DUCKDNS_TOKEN".path}`}}";
        ip_version = "ipv4";
      }
    ];
  };
}

Stack Options

nps.stacks.ddns-updater.containers.ddns-updater

Alias of {option}services.podman.containers.ddns-updater.

Type
plaintext
submodule
Declaration

nps.stacks.ddns-updater.enable

Whether to enable ddns-updater.

Type
plaintext
boolean
Default
nix
false
Example
nix
true
Declaration

nps.stacks.ddns-updater.extraEnv

Extra environment variables to set for the container. Variables can be either set directly or sourced from a file (e.g. for secrets).

See https://github.com/qdm12/ddns-updater?tab=readme-ov-file#environment-variables

Type
plaintext
attribute set of (null or boolean or signed integer or string or absolute path or (submodule))
Default
nix
{ }
Example
nix
{
  BACKUP_PERIOD = "72h15m";
}
Declaration

nps.stacks.ddns-updater.settings

Configuration settings for ddns-updater. Will be provided as the settings in the CONFIG environment variable.

The config will be templated using gomplate, so you can refer to secrets etc.

See https://github.com/qdm12/ddns-updater?tab=readme-ov-file#configuration

Type
plaintext
list of (JSON value)
Default
nix
[ ]
Example
nix
[
  {
    provider = "duckdns";
    domain = "example.duckdns.org";
    token = "{{ file.Read `${config.sops.secrets."DUCKDNS_TOKEN".path}`}}";
    ip_version = "ipv4";
  }
]
Declaration