From a648c165256823124517a863b7fe7a5568a393c6 Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 8 Nov 2024 20:04:11 -0500 Subject: [PATCH] Hevana: switch from Oink to DDClient --- hosts/Hevana/default.nix | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/hosts/Hevana/default.nix b/hosts/Hevana/default.nix index 4ff47ce..f7b4bb9 100644 --- a/hosts/Hevana/default.nix +++ b/hosts/Hevana/default.nix @@ -40,30 +40,17 @@ in time.timeZone = "America/New_York"; # Enable dynamic DNS with Porkbun - services.oink = { + services.ddclient = { enable = true; - settings = { - apiKey = config.secrets.networking.porkbun.api.apiKey; - secretApiKey = config.secrets.networking.porkbun.api.secretKey; - }; - domains = [ - { - domain = config.secrets.networking.domains.blog; - subdomain = ""; - } - { - domain = config.secrets.networking.domains.blog; - subdomain = "*"; - } - { - domain = config.secrets.networking.domains.primary; - subdomain = ""; - } - { - domain = config.secrets.networking.domains.primary; - subdomain = "*"; - } - ]; + configFile = pkgs.writeText "ddclient.conf" '' + use=web, web=checkip.dyndns.com/, web-skip='IP Address' + protocol=porkbun + apikey=${config.secrets.networking.porkbun.api.apiKey} + secretapikey=${config.secrets.networking.porkbun.api.secretKey} + *.${config.secrets.networking.domains.primary},*.${config.secrets.networking.domains.blog} + cache=/tmp/ddclient.cache + pid=/var/run/ddclient.pid + ''; }; # Configure the system.