nixos/prometheus-smartctl-exporter: fix evaluation after adding cfg.extraFlags

was done in 3c61665b7f but does not evaluate
error: value is a string with context while a list was expected
This commit is contained in:
ajs124 2023-04-13 16:50:06 +02:00 committed by Bjørn Forsman
parent 4496a91077
commit 6fc4e722c4

View file

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