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 let
cfg = config.services.prometheus.exporters.smartctl; cfg = config.services.prometheus.exporters.smartctl;
args = concatStrings [ args = lib.escapeShellArgs ([
"--web.listen-address=\"${cfg.listenAddress}:${toString cfg.port}\" " "--web.listen-address=${cfg.listenAddress}:${toString cfg.port}"
"--smartctl.path=\"${pkgs.smartmontools}/bin/smartctl\" " "--smartctl.path=${pkgs.smartmontools}/bin/smartctl"
"--smartctl.interval=\"${cfg.maxInterval}\" " "--smartctl.interval=${cfg.maxInterval}"
"${concatMapStringsSep " " (device: "--smartctl.device=${device}") cfg.devices}" ] ++ map (device: "--smartctl.device=${device}") cfg.devices
] ++ cfg.extraFlags; ++ cfg.extraFlags);
in { in {
port = 9633; port = 9633;