mirror of
https://github.com/thiloho/nixos-config.git
synced 2025-11-22 11:31:36 +01:00
Use new option to set database owners
This commit is contained in:
@@ -127,16 +127,14 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.postgresql_15;
|
package = pkgs.postgresql_15;
|
||||||
ensureDatabases = [ "dcbot" "hedgedoc" "todos" "gitea" ];
|
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 = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
name = "hedgedoc";
|
name = "hedgedoc";
|
||||||
ensurePermissions."DATABASE hedgedoc" = "ALL PRIVILEGES";
|
ensureDBOwnership = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "gitea";
|
name = "gitea";
|
||||||
ensurePermissions."DATABASE gitea" = "ALL PRIVILEGES";
|
ensureDBOwnership = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
authentication = lib.mkForce ''
|
authentication = lib.mkForce ''
|
||||||
|
|||||||
Reference in New Issue
Block a user