Talk: PostgreSQL

From NixOS Wiki
Revision as of 18:32, 22 January 2024 by Maikelthedev (talk | contribs) (reformatted the parts that were nix code)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.