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"; };