summary refs log tree commit diff
path: root/modules/ddns.nix
blob: c24ac876d49617ca6697d9c8b0c692262e5e1fbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ me, config, ... }:

let
  domain = "rnrd.eu";
in
{
  age.secrets.cloudflare-dns = {
    file = ../secrets/cloudflare-dns.age;
  };

  services.ddclient = {
    enable = true;

    # Cloudflare DNS API parameters

    # dyn.com no longer supports HTTPS :(
    # See: https://github.com/ddclient/ddclient/issues/597
    usev6 = "webv6, webv6=ipv6.icanhazip.com/";
    protocol = "cloudflare";

    username = "token";
    zone = domain;
    domains = [ "${me.name}.${domain}" ];
    passwordFile = config.age.secrets.cloudflare-dns.path;
  };
}