File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -57,16 +57,35 @@ self.inputs.nixpkgs.lib.nixos.runTest {
5757 services . postgresql = {
5858 enable = true ;
5959 package = psql_15 ;
60+ enableTCPIP = true ;
61+ authentication = ''
62+ local all postgres peer map=postgres
63+ local all all peer map=root
64+ '' ;
65+ identMap = ''
66+ root root supabase_admin
67+ postgres postgres postgres
68+ '' ;
69+ ensureUsers = [
70+ {
71+ name = "supabase_admin" ;
72+ ensureClauses . superuser = true ;
73+ }
74+ ] ;
6075 # pg_regress test for pgjwt rely on the "extensions" schema to be present
6176 initialScript = pkgs . writeText "init-postgres-with-schema" ''
6277 CREATE SCHEMA IF NOT EXISTS extensions;
6378 CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA extensions;
6479 '' ;
80+ settings = ( installedExtension "15" ) . defaultSettings or { } ;
6581 } ;
6682
83+ networking . firewall . allowedTCPPorts = [ config . services . postgresql . settings . port ] ;
84+
6785 specialisation . postgresql17 . configuration = {
6886 services . postgresql = {
6987 package = lib . mkForce psql_17 ;
88+ settings = ( installedExtension "17" ) . defaultSettings or { } ;
7089 } ;
7190
7291 systemd . services . postgresql-migrate = {
You can’t perform that action at this time.
0 commit comments