From 83c65007f8245bc0dc2afc4960b520d743216d72 Mon Sep 17 00:00:00 2001 From: Adrian Perez Date: Sat, 1 Nov 2025 16:39:03 -0700 Subject: [PATCH] nixos/grafana: disable preinstall when `declarativePlugins` is used Closes: #445194 --- nixos/modules/services/monitoring/grafana.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix index 46da20bec8ad..40325bfddda3 100644 --- a/nixos/modules/services/monitoring/grafana.nix +++ b/nixos/modules/services/monitoring/grafana.nix @@ -1300,6 +1300,18 @@ in type = types.bool; }; }; + + plugins = { + preinstall_disabled = mkOption { + description = '' + When set to `true`, disables the Background Plugin Installer, which runs before Grafana starts. + This component causes issues with `declarativePlugins` and is disabled by default if those are used. + ''; + default = cfg.declarativePlugins != null; + defaultText = literalExpression "cfg.declarativePlugins != null"; + type = types.bool; + }; + }; }; }; };