From 820f5afe0bfc56d785c46fe4b5864d3895252307 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sat, 3 May 2025 19:37:16 +0000 Subject: [PATCH] fix: cloudflare dyndns noproxy api key issues --- .../services/cloudflare-dyndns-noproxy.nix | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/platforms/nixos/modules/services/cloudflare-dyndns-noproxy.nix b/platforms/nixos/modules/services/cloudflare-dyndns-noproxy.nix index 451eb33..958b080 100644 --- a/platforms/nixos/modules/services/cloudflare-dyndns-noproxy.nix +++ b/platforms/nixos/modules/services/cloudflare-dyndns-noproxy.nix @@ -52,20 +52,7 @@ in ++ lib.optional config.services.cloudflare-dyndns.deleteMissing "--delete-missing"; in '' - export CLOUDFLARE_API_TOKEN_FILE=''${CREDENTIALS_DIRECTORY}/apiToken - echo $CLOUDFLARE_API_TOKEN_FILE - cat $CLOUDFLARE_API_TOKEN_FILE - - # Added 2025-03-10: `cfg.apiTokenFile` used to be passed as an - # `EnvironmentFile` to the service, which required it to be of - # the form "CLOUDFLARE_API_TOKEN=" rather than just the secret. - # If we detect this legacy usage, error out. - token=$(< "''${CLOUDFLARE_API_TOKEN_FILE}") - if [[ $token == CLOUDFLARE_API_TOKEN* ]]; then - echo "Error: your api token starts with 'CLOUDFLARE_API_TOKEN='. Remove that, and instead specify just the token." >&2 - exit 1 - fi - + export CLOUDFLARE_API_TOKEN=$(cat ''${CREDENTIALS_DIRECTORY}/apiToken) exec ${lib.getExe pkgs.cloudflare-dyndns} ${toString args} ''; };