From 1a6587231b064ad33ed33db113035e37b32c6dcc Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 5 Sep 2024 12:05:54 +0200 Subject: [PATCH] nixos/prometheus-exporters: fix assertions declared in exporter modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And it turns out, the test was using a removed option all along 🙃 (cherry picked from commit 4980a7d93826dc96621c6306b1e4b2cdd076f2ab) --- nixos/modules/services/monitoring/prometheus/exporters.nix | 1 + nixos/tests/prometheus-exporters.nix | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index 2dc12a221bf0..50200da82e04 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -230,6 +230,7 @@ let in mkIf conf.enable { warnings = conf.warnings or []; + assertions = conf.assertions or []; users.users."${name}-exporter" = (mkIf (conf.user == "${name}-exporter" && !enableDynamicUser) { description = "Prometheus ${name} exporter service user"; isSystemUser = true; diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 56569c4de2c8..a0f895d4cb2d 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -435,7 +435,6 @@ let json = { exporterConfig = { enable = true; - url = "http://localhost"; configFile = pkgs.writeText "json-exporter-conf.json" (builtins.toJSON { modules = { default = {