From 01e195b58cb0896fe058f04213a038505257c33d Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sat, 26 Aug 2023 08:50:36 -0700 Subject: [PATCH] added variable time update --- flake.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 5f6d9dc..919e99c 100644 --- a/flake.nix +++ b/flake.nix @@ -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 ''; }; + frequency = lib.mkOption { + type = lib.type.int; + description = lib.mdDoc '' + The number of minutes to wait between updates + ''; + }; }; config.systemd.services.status_cloud = let cfg = config.services.status_cloud; @@ -109,7 +115,7 @@ rust-project TODO: write shell script for automatically updating `cargoHash` in lib.mkIf cfg.enable { wantedBy = [ "timers.target" ]; partOf = [ "status_cloud.service" ]; - timerConfig.OnCalendar = [ "*:0/15" ]; + timerConfig.OnCalendar = [ "*:0/${builtins.toString cfg.frequncy}" ]; }; };