Fix string warning, script execution
Some checks failed
Check flake syntax / flake-check (push) Has been cancelled

This commit is contained in:
2025-10-25 22:16:38 +02:00
parent 360d9b3df7
commit 523005ed94

View File

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