How to get PostgreSQL to accept TPC/IP with new Nix Immich Module

I have immich running on NixOS 24.11 using the new module. I would like to use Immich Power Tools to delete albums in bulk and add geo data to 18k photos.

immich power tools is running as a docker container on a different host on the same LAN however it is unable to connect to the PostgreSQL database.

I expected services.immich.database.host to allow connections over TCP/IP however I am still unable to access the database remotely.

table pq_hba_file_rules; is still showing 127.0.0.1

below is my configuration nix for the immich module.

  services.immich = {
    enable = true;
    port = 2283;
    host = "0.0.0.0";
    database.host = "0.0.0.0";
    secretsFile = "/home/Redacted/nix-config/.db_pass";
};

Got it to work by setting the password manually and adding the following to my config:

  services.postgresql.enableTCPIP = true;
  services.postgresql.authentication = lib.mkOverride 10 ''
          #type database DBuser origin-address auth-method
          local all      all    peer
          # ipv4
          host  all      all    10.0.0.0/0   password
          # ipv6
          host  all      all    ::1/128        password
        '';

Although – now I’m wondering if i should remove the database host setting. What does this do?