From 6fc4e722c468908cf5967308bf3b25a82169fab0 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Thu, 13 Apr 2023 16:50:06 +0200 Subject: [PATCH] nixos/prometheus-smartctl-exporter: fix evaluation after adding cfg.extraFlags was done in 3c61665b7f5c8520706e445201b1a6509eb09997 but does not evaluate error: value is a string with context while a list was expected --- .../monitoring/prometheus/exporters/smartctl.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/monitoring/prometheus/exporters/smartctl.nix b/nixos/modules/services/monitoring/prometheus/exporters/smartctl.nix index f80aeae9c6b7..50e1321a1e9c 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/smartctl.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/smartctl.nix @@ -4,12 +4,12 @@ with lib; let cfg = config.services.prometheus.exporters.smartctl; - args = concatStrings [ - "--web.listen-address=\"${cfg.listenAddress}:${toString cfg.port}\" " - "--smartctl.path=\"${pkgs.smartmontools}/bin/smartctl\" " - "--smartctl.interval=\"${cfg.maxInterval}\" " - "${concatMapStringsSep " " (device: "--smartctl.device=${device}") cfg.devices}" - ] ++ cfg.extraFlags; + args = lib.escapeShellArgs ([ + "--web.listen-address=${cfg.listenAddress}:${toString cfg.port}" + "--smartctl.path=${pkgs.smartmontools}/bin/smartctl" + "--smartctl.interval=${cfg.maxInterval}" + ] ++ map (device: "--smartctl.device=${device}") cfg.devices + ++ cfg.extraFlags); in { port = 9633;