diff --git a/modules/hosts/john-pc-ubuntu.nix b/modules/hosts/john-pc-ubuntu.nix index b3b535a..406182e 100644 --- a/modules/hosts/john-pc-ubuntu.nix +++ b/modules/hosts/john-pc-ubuntu.nix @@ -83,6 +83,7 @@ in }; restic = { passwordFile = resticPasswordFile; + OnCalendar = "*:0/15"; paths = [ "${config.xdg.userDirs.documents}" "/conf" ]; exclude = [ "/home/*/Pictures" diff --git a/modules/services/restic/restic.nix b/modules/services/restic/restic.nix index 5b723b9..1c3cbc0 100644 --- a/modules/services/restic/restic.nix +++ b/modules/services/restic/restic.nix @@ -33,6 +33,15 @@ type = lib.types.listOf lib.types.str; default = [ ]; }; + OnCalendar = lib.mkOption { + description = ""; + type = lib.types.str; + }; + RandomizedDelaySec = lib.mkOption { + description = ""; + type = lib.types.str; + default = "1m"; + }; }; config = let @@ -61,9 +70,9 @@ passwordFile = cfg.passwordFile; paths = cfg.paths; timerConfig = { - OnCalendar = "00:05"; + OnCalendar = cfg.OnCalendar; + RandomizedDelaySec = cfg.RandomizedDelaySec; Persistent = true; - RandomizedDelaySec = "5h"; }; runCheck = true; pruneOpts = [