File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
modules/lido/withdrawals-automation Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 1717 {
1818 options . services . lido-withdrawals-automation = with lib ; {
1919 enable = mkEnableOption ( lib . mdDoc "Lido Withdrawals Automation" ) ;
20+ timerFrequency = mkOption {
21+ type = types . str ;
22+ default = "daily" ;
23+ example = "hourly" ;
24+ } ;
2025 args = {
2126 percentage = mkOption {
2227 type = types . nullOr types . int ;
7883 } ;
7984 } ;
8085 } ;
81- config = {
82- systemd . services . lido-withdrawals-automation = lib . mkIf cfg . enable {
86+ config = lib . mkIf cfg . enable {
87+
88+ systemd . timers . lido-withdrawals-automation = {
89+ wantedBy = [ "timers.target" ] ;
90+ partOf = [ "lido-withdrawals-automation.service" ] ;
91+ timerConfig = {
92+ OnCalendar = cfg . timerFrequency ;
93+ Unit = "lido-withdrawals-automation.service" ;
94+ } ;
95+ } ;
96+
97+ systemd . services . lido-withdrawals-automation = {
8398 description = "Lido Withdrawals Automation" ;
8499
85100 wantedBy = [ "multi-user.target" ] ;
90105
91106 serviceConfig = lib . mkMerge [
92107 {
108+ Type = "oneshot" ;
93109 Group = "lido" ;
94110 ExecStart = lib . getExe (
95111 pkgs . writeShellApplication {
You can’t perform that action at this time.
0 commit comments