diff options
author | ajs124 <git@ajs124.de> | 2023-04-13 16:50:06 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2023-04-13 17:32:50 +0200 |
commit | 6fc4e722c468908cf5967308bf3b25a82169fab0 (patch) | |
tree | 3da406fa42c8504cb7bdb326f251ddb4fc8a8810 /nixos/modules/services/monitoring/prometheus/exporters | |
parent | 4496a91077366a019d2c400abaf0c097b31fb3cc (diff) |
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
Diffstat (limited to 'nixos/modules/services/monitoring/prometheus/exporters')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters/smartctl.nix | 12 |
1 files 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 f80aeae9c6b7d..50e1321a1e9ce 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; |