Talk:PostgreSQL

From NixOS Wiki
Revision as of 18:04, 22 January 2024 by imported>Maikelthedev (TCP/IP version misses the local auth and can't run)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The instructions are incomplete and lead to a systm that never runs because is missing the local part. This is what worked for me.

 services.postgresql = {
   settings = {
     listen_addresses = "*";  
   };
   enable = true;
   enableTCPIP = true;
   authentication = pkgs.lib.mkOverride 10 

local all all trust host all all  ::1/128 trust host all postgres 127.0.0.1/32 trust

   ;
 };

if you just do the part that accepts TCP connections WITHOUT the local, it just doesn't run because it is missing it.