mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
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:
parent
4496a91077
commit
6fc4e722c4
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user