postgres: migrated to ensureDBOwnership

This commit is contained in:
Fiscal Velvet Poet 2023-12-04 17:52:04 +10:00
parent 53f7767233
commit 49906ecad7
Signed by: fiscalvelvetpoet
GPG key ID: D8EBFD58B023BD47

View file

@ -67,6 +67,7 @@ in {
services.postgresql = {
enable = true; # Ensure postgresql is enabled
package = pkgs.postgresql;
authentication = ''
local gitea all ident map=gitea-users
'';
@ -79,11 +80,7 @@ in {
ensureUsers = [
{
name = "gitea"; # Ensure the database user persists
ensurePermissions = {
# Ensure the database permissions persist
"DATABASE gitea" = "ALL PRIVILEGES";
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
};
ensureDBOwnership = true;
}
];
};