From 1d0fd8d461459e225e6144a56f07f04438be0bcf Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 18 Jan 2022 09:05:22 +0100 Subject: [PATCH] services: restic: allow configuring timer --- services/restic-backup.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/services/restic-backup.nix b/services/restic-backup.nix index 624deca..8d57f5c 100644 --- a/services/restic-backup.nix +++ b/services/restic-backup.nix @@ -72,6 +72,13 @@ in { type = types.str; default = "/root/restic/creds"; }; + + timerConfig = mkOption { + type = types.attrsOf types.str; + default = { + OnCalendar = "daily"; + }; + }; }; config = mkIf cfg.enable { @@ -89,9 +96,7 @@ in { extraBackupArgs = [ "--verbose=2" ] ++ optional (builtins.length cfg.exclude != 0) excludeArg; - timerConfig = { - OnCalendar = "daily"; - }; + timerConfig = cfg.timerConfig; pruneOpts = makePruneOpts cfg.prune; };