mirror of
https://github.com/nmasur/dotfiles
synced 2025-05-10 04:15:51 +00:00
fix for cloudflare-dyndns using noproxy fix as well
This commit is contained in:
parent
61c4e68fef
commit
e803e6a02a
@ -157,6 +157,19 @@ in
|
||||
systemd.services.cloudflare-dyndns = lib.mkIf config.services.cloudflare-dyndns.enable {
|
||||
after = [ "cloudflare-api-secret.service" ];
|
||||
requires = [ "cloudflare-api-secret.service" ];
|
||||
script =
|
||||
let
|
||||
args =
|
||||
[ "--cache-file /var/lib/cloudflare-dyndns/ip.cache" ]
|
||||
++ (if config.services.cloudflare-dyndns.ipv4 then [ "-4" ] else [ "-no-4" ])
|
||||
++ (if config.services.cloudflare-dyndns.ipv6 then [ "-6" ] else [ "-no-6" ])
|
||||
++ lib.optional config.services.cloudflare-dyndns.deleteMissing "--delete-missing"
|
||||
++ lib.optional config.services.cloudflare-dyndns.proxied "--proxied";
|
||||
in
|
||||
lib.mkForce ''
|
||||
export CLOUDFLARE_API_TOKEN=$(cat ''${CREDENTIALS_DIRECTORY}/apiToken)
|
||||
exec ${lib.getExe pkgs.cloudflare-dyndns} ${toString args}
|
||||
'';
|
||||
};
|
||||
|
||||
# Enable the home-made service that we created for non-proxied records
|
||||
|
Loading…
x
Reference in New Issue
Block a user