Fix string warning, script execution
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m51s
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m51s
This commit is contained in:
@@ -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";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user