Use new option to set database owners

This commit is contained in:
thiloho
2023-11-26 15:56:56 +01:00
parent 3638553b88
commit 4f64939c2a

View File

@@ -127,16 +127,14 @@
enable = true;
package = pkgs.postgresql_15;
ensureDatabases = [ "dcbot" "hedgedoc" "todos" "gitea" ];
# ALTER DATABASE mydb OWNER TO admin;
# The user also needs to be the owner of the specific database, which cannot be declaratively set up from this module
ensureUsers = [
{
name = "hedgedoc";
ensurePermissions."DATABASE hedgedoc" = "ALL PRIVILEGES";
ensureDBOwnership = true;
}
{
name = "gitea";
ensurePermissions."DATABASE gitea" = "ALL PRIVILEGES";
ensureDBOwnership = true;
}
];
authentication = lib.mkForce ''