grafana: use postgresql

Doesn't use for data, only annotation and other stuff
This commit is contained in:
2026-04-07 12:44:59 -04:00
parent 2848c7e897
commit 0df5d98770

View File

@@ -26,6 +26,12 @@
root_url = "https://${service_configs.grafana.domain}";
};
database = {
type = "postgres";
host = service_configs.postgres.socket;
user = "grafana";
};
"auth.anonymous" = {
enabled = true;
org_role = "Admin";
@@ -83,4 +89,15 @@
import ${config.age.secrets.caddy_auth.path}
reverse_proxy :${toString service_configs.ports.private.grafana.port}
'';
services.postgresql = {
ensureDatabases = [ "grafana" ];
ensureUsers = [
{
name = "grafana";
ensureDBOwnership = true;
ensureClauses.login = true;
}
];
};
}