Begin Dendritic rewrite
This commit is contained in:
@@ -1,40 +1,44 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
{ ... }: {
|
||||
|
||||
options.sysconfig.services.dynamicDNS.enable = with lib; mkOption {
|
||||
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
||||
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
options.sysconfig.services.dynamicDNS.enable = with lib; mkOption {
|
||||
|
||||
config = lib.mkIf config.sysconfig.services.dynamicDNS.enable {
|
||||
|
||||
systemd.timers.dynamicDNS = {
|
||||
|
||||
wantedBy = [ "timers.target" ];
|
||||
|
||||
timerConfig = {
|
||||
|
||||
OnBootSec = "5m";
|
||||
|
||||
OnUnitActiveSec = "1h";
|
||||
|
||||
Unit = "dynamicDNS.service";
|
||||
};
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
systemd.services.dynamicDNS = {
|
||||
config = lib.mkIf config.sysconfig.services.dynamicDNS.enable {
|
||||
|
||||
name = "dynamicDNS.service";
|
||||
systemd.timers.dynamicDNS = {
|
||||
|
||||
serviceConfig = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
|
||||
Type = "oneshot";
|
||||
timerConfig = {
|
||||
|
||||
LoadCredential = [ "cloudflare-api-key" ];
|
||||
OnBootSec = "5m";
|
||||
|
||||
OnUnitActiveSec = "1h";
|
||||
|
||||
Unit = "dynamicDNS.service";
|
||||
};
|
||||
};
|
||||
|
||||
script = '''';
|
||||
systemd.services.dynamicDNS = {
|
||||
|
||||
name = "dynamicDNS.service";
|
||||
|
||||
serviceConfig = {
|
||||
|
||||
Type = "oneshot";
|
||||
|
||||
LoadCredential = [ "cloudflare-api-key" ];
|
||||
|
||||
};
|
||||
|
||||
script = '''';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user