From 6cabd45e1c4e8a06af27e13edf242bccd936cc94 Mon Sep 17 00:00:00 2001 From: ahtlon Date: Sat, 25 Oct 2025 22:16:38 +0200 Subject: [PATCH] Fix string warning, script execution --- machines/overwatch/printer_module.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/machines/overwatch/printer_module.nix b/machines/overwatch/printer_module.nix index 8d457ff..0eda1d1 100644 --- a/machines/overwatch/printer_module.nix +++ b/machines/overwatch/printer_module.nix @@ -4,10 +4,10 @@ enable = lib.mkOption { type = lib.types.bool; default = false; - description = "Enable the script to pull data from the printer" + description = "Enable the script to pull data from the printer"; }; timer = lib.mkOption { - type = lib.types.string; + type = lib.types.str; default = "1m"; description = "systemd timer for script execution"; }; @@ -17,13 +17,13 @@ systemd.services."printer-scraping" = { description = "Pull printer stats and upload to influxdb"; serviceConfig.Type = "oneshot"; - path = with pkgs; [yq curl]; - script = "exec ${./pull_info.sh}"; + path = with pkgs; [yq jq curl bash]; + script = "bash ${./pull_info.sh}"; }; systemd.timers."printer-scraping" = { wantedBy = ["timers.target"]; timerConfig = { - OnBootSec = "60s"; + OnBootSec = "5s"; OnUnitActiveSec = config.printer_scraping.timer; Unit = "printer-scraping.service"; };