goodbye ydns

This commit is contained in:
Michele Guerini Rocco 2024-11-06 15:09:21 +01:00
parent 3ce8688070
commit cf0c23f54f
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450
4 changed files with 63 additions and 108 deletions

View File

@ -15,47 +15,6 @@ with lib;
'';
};
systemd.services.ydns = {
description = "update ydns address record";
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
startAt = "*:0/30";
serviceConfig.Type = "oneshot";
serviceConfig.environmentFile = config.secrets.environments.ydns;
path = with pkgs; [ curl cacert gawk iproute ];
environment = {
YDNS_HOST = config.var.hostname;
CURL_CA_BUNDLE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
};
script = ''
update() {
ret=$(curl -$1 --basic --silent \
-u "$YDNS_USER:$YDNS_PASSWD" \
"https://ydns.io/api/v1/update/?host=$YDNS_HOST&ip=$2" || exit 0)
case "$ret" in
ok)
echo "updated successfully: $YDNS_HOST ($2)"
;;
badauth)
echo "updated failed: $YDNS_HOST (authentication failed)"
;;
*)
echo "update failed: $YDNS_HOST ($ret)"
;;
esac
}
update 4 "$(curl -s -4 https://ydns.io/api/v1/ip)"
update 6 "$(ip addr show mngtmpaddr | awk '/inet6/{print $2; exit}' | cut -d/ -f1)"
'';
};
systemd.services.backup =
let
saved = pkgs.writeText "backup-saved" ''

View File

@ -12,7 +12,6 @@
# Configures the bit. zone
resolveNamecoin = true;
dns.port = 54;
settings.export-etc-hosts = true;
};
# Public DNS resolver

View File

@ -1,64 +1,63 @@
U2FsdGVkX19Beh+m1FJMvUT8YVRn9/SaJTpPC7OlZt/wPuLTZACeborU3sKPkV6/
qIhjM4zLrN3+2ILD9aHP0cqTrY6WAJZDHwqgRXz5v4M7x5LGP1FUXQ/Sm1IjQ7HG
k9tVZFMcQ02EnxBiYR9P8GJDfjJ+iBu2CodzxcCIRJqvLtFh90UP7Atk9EIN+Wqr
k22RW2mS8pFqnnHtYupnrs6wPs2VDV7qk5jsdwUKX3nN3mqF1OWnlCnqsWpTn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