diff --git a/nixos/modules/services/monitoring/scrutiny.nix b/nixos/modules/services/monitoring/scrutiny.nix index c4212b4d7bd4..1c3cbd9a7a3a 100644 --- a/nixos/modules/services/monitoring/scrutiny.nix +++ b/nixos/modules/services/monitoring/scrutiny.nix @@ -6,7 +6,6 @@ ... }: let - inherit (lib) maintainers; inherit (lib.meta) getExe; inherit (lib.modules) mkIf mkMerge; inherit (lib.options) @@ -205,6 +204,7 @@ in systemd.services.scrutiny = { description = "Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds"; + enableStrictShellChecks = true; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ] ++ lib.optional cfg.influxdb.enable "influxdb2.service"; wants = lib.optional cfg.influxdb.enable "influxdb2.service"; @@ -217,7 +217,7 @@ in ${genJqSecretsReplacementSnippet cfg.settings "/run/scrutiny/config.yaml"} ''; postStart = '' - for i in $(seq 300); do + for _ in $(seq 300); do if "${lib.getExe pkgs.curl}" --fail --silent --head "http://${cfg.settings.web.listen.host}:${toString cfg.settings.web.listen.port}" >/dev/null; then echo "Scrutiny is ready (port is open)" exit 0 @@ -251,6 +251,7 @@ in systemd = { services.scrutiny-collector = { description = "Scrutiny Collector Service"; + enableStrictShellChecks = true; after = lib.optional cfg.enable "scrutiny.service"; wants = lib.optional cfg.enable "scrutiny.service"; environment = {