Adds dyndns-updated launchd service

nix-darwin
Abhinav Sarkar 2022-09-26 23:50:47 +05:30
parent 6c021c3ea0
commit 83597f449f
2 changed files with 19 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
.DS_Store
.cloudflare_dns_updater_api_token

View File

@ -183,4 +183,22 @@
(import ./dm-mono.nix { inherit lib fetchzip; })
];
launchd.agents.dyndns-updater = {
enable = true;
config = {
Program = "${pkgs.cloudflare-dyndns}/bin/cloudflare-dyndns";
ProgramArguments = [
"${pkgs.cloudflare-dyndns}/bin/cloudflare-dyndns"
"--api-token"
(builtins.readFile ./.cloudflare_dns_updater_api_token)
"--debug"
"home.abhinavsarkar.net"
];
StandardErrorPath = "/tmp/cloudflare-dyndns.log";
StandardOutPath = "/tmp/cloudflare-dyndns.log";
StartInterval = 600;
ProcessType = "Background";
};
};
}