nixos/grafana: ensure that declarative prometheus data-sources don't use direct access
Support for that was permanently dropped in Grafana 9.2.0, see also https://github.com/grafana/grafana/commit/f30795b0884dd3485423a12d7d7d0860453967a7
This commit is contained in:
@@ -720,6 +720,12 @@ in {
|
||||
assertion = cfg.smtp.password != opt.smtp.password.default -> cfg.smtp.passwordFile == null;
|
||||
message = "Cannot set both password and passwordFile";
|
||||
}
|
||||
{
|
||||
assertion = all
|
||||
({ type, access, ... }: type == "prometheus" -> access != "direct")
|
||||
cfg.provision.datasources;
|
||||
message = "For datasources of type `prometheus`, the `direct` access mode is not supported anymore (since Grafana 9.2.0)";
|
||||
}
|
||||
];
|
||||
|
||||
systemd.services.grafana = {
|
||||
|
||||
Reference in New Issue
Block a user