Files
Olympus/system/services/dynamicDNS/default.nix
2026-03-06 16:24:53 -06:00

45 lines
913 B
Nix

{ ... }: {
flake.nixosModules.default = { config, lib, pkgs, ... }: {
options.sysconfig.services.dynamicDNS.enable = with lib; mkOption {
type = with types; bool;
default = false;
};
config = lib.mkIf config.sysconfig.services.dynamicDNS.enable {
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 = '''';
};
};
};
}