ops/nixos: other deprecation cleanups

This commit is contained in:
Luke Granger-Brown 2024-07-03 22:29:08 +01:00
parent 98cb562688
commit 81f325bed6
2 changed files with 7 additions and 2 deletions

View file

@ -66,7 +66,12 @@ let
};
}];
};
stockExporters = lib.mapAttrsToList (exporterName: exporter: mkExporter exporterName exporter.port) (lib.filterAttrs (exporterName: exporter: exporterName != "unifi-poller" && exporterName != "snmp" && builtins.isAttrs exporter && exporter.enable) sys.config.services.prometheus.exporters);
allowStockExporters = {
unifi-poller = false;
snmp = false;
minio = false;
};
stockExporters = lib.mapAttrsToList (exporterName: exporter: mkExporter exporterName exporter.port) (lib.filterAttrs (exporterName: exporter: (allowStockExporters.${exporterName} or true) && builtins.isAttrs exporter && exporter.enable) sys.config.services.prometheus.exporters);
customExporters = lib.mapAttrsToList mkExporter sys.config.my.prometheus.additionalExporterPorts;
in
stockExporters ++ customExporters;

View file

@ -26,7 +26,7 @@ in {
light = [{
platform = "group";
name = "Bedroom Lights";
entities = map (x: "light.overhead_${x.side}_${x.n}") (lib.cartesianProductOfSets { side = [ "left" "right" ]; n = [ "1" "2" "3" "4" ]; });
entities = map (x: "light.overhead_${x.side}_${x.n}") (lib.cartesianProduct { side = [ "left" "right" ]; n = [ "1" "2" "3" "4" ]; });
}];
cast = {};
plex = {};