postgres: switch to ensureDBOwnership

This commit is contained in:
notohh 2023-11-24 10:31:22 -05:00
parent a6179acc02
commit 132d74c10f
Signed by: notohh
GPG key ID: BD47506D475EE86D

View file

@ -20,31 +20,25 @@
host all all all trust
'';
ensureUsers = [
{
name = "postgres";
ensurePermissions = {
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
};
}
{
name = "hedgedoc";
ensurePermissions."DATABASE hedgedoc" = "ALL PRIVILEGES";
ensureDBOwnership = true;
}
{
name = "forgejo";
ensurePermissions."DATABASE forgejo" = "ALL PRIVILEGES";
ensureDBOwnership = true;
}
{
name = "grafana";
ensurePermissions."DATABASE grafana" = "ALL PRIVILEGES";
ensureDBOwnership = true;
}
{
name = "authelia";
ensurePermissions."DATABASE authelia" = "ALL PRIVILEGES";
ensureDBOwnership = true;
}
{
name = "vaultwarden";
ensurePermissions."DATABASE vaultwarden" = "ALL PRIVILEGES";
ensureDBOwnership = true;
}
];
ensureDatabases = [