use new postgresql module for grafana
This commit is contained in:
parent
77e16c0f76
commit
df03ba57e2
1 changed files with 6 additions and 15 deletions
|
@ -36,21 +36,12 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "grafana" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "grafana";
|
||||
ensurePermissions = {
|
||||
"DATABASE grafana" = "ALL PRIVILEGES";
|
||||
};
|
||||
ensureClauses = {
|
||||
"login" = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
shb.postgresql.passwords = [
|
||||
{
|
||||
username = "grafana";
|
||||
database = "grafana";
|
||||
}
|
||||
];
|
||||
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
|
|
Loading…
Reference in a new issue