start on netbird and dynamicDNS

This commit is contained in:
2025-02-16 17:36:41 -06:00
parent 06e9c0e8ae
commit 9aed1080fb
2 changed files with 113 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
{ config, lib, pkgs, ... }: {
options.sysconfig.opts.dynamicDNS.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.sysconfig.opts.dynamicDNS {
systemd.timers.dynamicDNS = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "5m";
OnUnitActiveSec = "1h";
Unit = "dynamicDNS.service";
};
};
systemd.services.dynamicDNS = {
name = "dynamicDNS.service";
serviceConfig = {
Type = "oneshot";
LoadCredential = [ "cloudflare-api-key" ];
};
script = '''';
};
};
}