postgres: migrated to ensureDBOwnership
This commit is contained in:
parent
53f7767233
commit
49906ecad7
|
@ -67,6 +67,7 @@ in {
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true; # Ensure postgresql is enabled
|
enable = true; # Ensure postgresql is enabled
|
||||||
|
package = pkgs.postgresql;
|
||||||
authentication = ''
|
authentication = ''
|
||||||
local gitea all ident map=gitea-users
|
local gitea all ident map=gitea-users
|
||||||
'';
|
'';
|
||||||
|
@ -79,11 +80,7 @@ in {
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
name = "gitea"; # Ensure the database user persists
|
name = "gitea"; # Ensure the database user persists
|
||||||
ensurePermissions = {
|
ensureDBOwnership = true;
|
||||||
# Ensure the database permissions persist
|
|
||||||
"DATABASE gitea" = "ALL PRIVILEGES";
|
|
||||||
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue