From bc0012d036b02093c1cf0322866db8ddad707ef6 Mon Sep 17 00:00:00 2001 From: Keenan Weaver Date: Sat, 7 Jun 2025 07:11:50 -0500 Subject: [PATCH] ludusavi: add frequency option --- modules/services/ludusavi.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/services/ludusavi.nix b/modules/services/ludusavi.nix index e7c31e55..043d6391 100644 --- a/modules/services/ludusavi.nix +++ b/modules/services/ludusavi.nix @@ -37,6 +37,17 @@ in See https://github.com/mtkennerly/ludusavi/blob/master/docs/help/configuration-file.md for available options. ''; }; + frequency = mkOption { + type = lib.types.str; + default = "daily"; + example = "*-*-* 8:00:00"; + description = '' + How often to run ludusavi. This value is passed to the systemd + timer configuration as the onCalendar option. See + {manpage}`systemd.time(7)` + for more information about the format. + ''; + }; settings = mkOption { type = settingsFormat.type; default = { @@ -93,8 +104,8 @@ in }; }; timers.ludusavi = { - Unit.Description = "Run a game save backup with Ludusavi, daily"; - Timer.OnCalendar = "daily"; + Unit.Description = "Run a game save backup with Ludusavi"; + Timer.OnCalendar = cfg.frequency; Install.WantedBy = [ "timers.target" ]; }; };