nix-stuff/roles/server/ddclient.nix

21 lines
526 B
Nix
Executable file

{
config,
flakeSelf,
...
}: let
hostSecrets = "${flakeSelf.inputs.secrets}/" + config.networking.hostName;
in {
# Set up secrets
age.secrets = {ddclient-passwd.file = hostSecrets + "/ddclient-password.age";};
services.ddclient = {
enable = true;
usev4 = "webv4, webv4=https://api.ipify.org";
usev6 = "";
protocol = "namecheap";
server = "dynamicdns.park-your-domain.com";
username = "toast003.xyz";
passwordFile = config.age.secrets.ddclient-passwd.path;
domains = ["@"];
};
}