added variable time update

This commit is contained in:
Nickiel12 2023-08-26 08:50:36 -07:00
parent f40a9264c3
commit 01e195b58c

View file

@ -88,6 +88,12 @@ rust-project TODO: write shell script for automatically updating `cargoHash`
The file path to the toml that contains user information secrets The file path to the toml that contains user information secrets
''; '';
}; };
frequency = lib.mkOption {
type = lib.type.int;
description = lib.mdDoc ''
The number of minutes to wait between updates
'';
};
}; };
config.systemd.services.status_cloud = let config.systemd.services.status_cloud = let
cfg = config.services.status_cloud; cfg = config.services.status_cloud;
@ -109,7 +115,7 @@ rust-project TODO: write shell script for automatically updating `cargoHash`
in lib.mkIf cfg.enable { in lib.mkIf cfg.enable {
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
partOf = [ "status_cloud.service" ]; partOf = [ "status_cloud.service" ];
timerConfig.OnCalendar = [ "*:0/15" ]; timerConfig.OnCalendar = [ "*:0/${builtins.toString cfg.frequncy}" ];
}; };
}; };