Roll back the setup.psql

pull/19/head
Inex Code 2022-07-15 18:54:14 +03:00
parent 5e000f850e
commit 3585911798
1 changed files with 10 additions and 8 deletions

View File

@ -18,7 +18,7 @@ in
postgresql = {
enable = true;
package = pkgs.postgresql_12;
# initialScript = "/etc/setup.psql";
initialScript = "/etc/setup.psql";
ensureDatabases = [
"pleroma"
];
@ -32,13 +32,15 @@ in
];
};
};
# environment.etc."setup.psql".text = ''
# \c pleroma;
# --Extensions made by ecto.migrate that need superuser access
# CREATE EXTENSION IF NOT EXISTS citext;
# CREATE EXTENSION IF NOT EXISTS pg_trgm;
# CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
# '';
environment.etc."setup.psql".text = ''
CREATE USER pleroma;
CREATE DATABASE pleroma OWNER pleroma;
\c pleroma;
--Extensions made by ecto.migrate that need superuser access
CREATE EXTENSION IF NOT EXISTS citext;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
'';
users.users.pleroma = {
extraGroups = [ "postgres" ];
isNormalUser = false;