all repos — nixfiles @ 7510f22640aaf52b859d0eb04a3ee867cf406919

System and user configuration, managed by nix and home-manager

Configure ddclient to update AAAA record for prefect

Alan Pearce
commit

7510f22640aaf52b859d0eb04a3ee867cf406919

parent

f39f143812c161941546d39889dab9f3d2ef20cb

1 file changed, 35 insertions(+), 0 deletions(-)

changed files
M system/prefect.nixsystem/prefect.nix
@@ -136,5 +136,40 @@ networking = {
hostName = "prefect"; }; + services.ddclient = { + enable = true; + package = (pkgs.ddclient.overrideAttrs + (old: { + patches = (old.patches or [ ]) ++ [ + ../patches/ddclient-noipv4.patch + ]; + })); + use = "no"; + protocol = "nsupdate"; + verbose = true; + zone = "alanpearce.eu"; + server = "pappel.alanpearce.eu"; + passwordFile = "/etc/secrets/ddns.key"; + domains = [ "prefect.home.alanpearce.eu" ]; + extraConfig = '' + usev4=disabled + usev6=cmdv6 + cmdv6=${pkgs.writeScript "getipv6" '' + #!/bin/sh + set -eo pipefail + ip --oneline address show dev enp7s0 to 2000::/3 primary \ + | awk '{ print $4 }' \ + | cut -d/ -f1 + ''} + ttl=3600 + ''; + }; + systemd.services.ddclient.path = with pkgs; + [ + iproute2 + coreutils + gawk + ]; + system.stateVersion = "23.05"; }