From 376e20fe048b0056a8c4863355c9a2142355b366 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Mon, 19 Dec 2022 08:27:41 +0000 Subject: [PATCH] ops/nixos: update to cope with the fact we now have warnings/errors at the top level in the exporters set --- ops/nixos/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ops/nixos/default.nix b/ops/nixos/default.nix index f1103df13b..a3173f5f51 100644 --- a/ops/nixos/default.nix +++ b/ops/nixos/default.nix @@ -67,7 +67,7 @@ let }; }]; }; - stockExporters = lib.mapAttrsToList (exporterName: exporter: mkExporter exporterName exporter.port) (lib.filterAttrs (exporterName: exporter: exporterName != "snmp" && exporter.enable) sys.config.services.prometheus.exporters); + stockExporters = lib.mapAttrsToList (exporterName: exporter: mkExporter exporterName exporter.port) (lib.filterAttrs (exporterName: exporter: builtins.isAttrs exporter && exporterName != "snmp" && exporter.enable) sys.config.services.prometheus.exporters); customExporters = lib.mapAttrsToList mkExporter sys.config.my.prometheus.additionalExporterPorts; in stockExporters ++ customExporters;