From 81f325bed6003c27f6c7a6a31cab634fe621d58a Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Wed, 3 Jul 2024 22:29:08 +0100 Subject: [PATCH] ops/nixos: other deprecation cleanups --- ops/nixos/default.nix | 7 ++++++- ops/nixos/totoro/home-assistant.nix | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ops/nixos/default.nix b/ops/nixos/default.nix index 97d312d228..2eacf9b9bd 100644 --- a/ops/nixos/default.nix +++ b/ops/nixos/default.nix @@ -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; diff --git a/ops/nixos/totoro/home-assistant.nix b/ops/nixos/totoro/home-assistant.nix index 0ab5db065c..74d5eb7b08 100644 --- a/ops/nixos/totoro/home-assistant.nix +++ b/ops/nixos/totoro/home-assistant.nix @@ -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 = {};