Commit 6fc4e722 authored by ajs124's avatar ajs124 Committed by Bjørn Forsman
Browse files

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

was done in 3c61665b but does not evaluate
error: value is a string with context while a list was expected
parent 4496a910
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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;