fix pg_hba template

This commit is contained in:
asyncnomi 2025-08-02 01:47:03 +02:00
parent 41a6ed984a
commit 43e7ecc060

View file

@ -34,7 +34,7 @@ in
superuser_map root postgres
superuser_map postgres postgres
'';
authentication = lib.mkOverride 10 (builtins.concatStringsSep "\n " ([''
authentication = lib.mkForce (builtins.concatStringsSep "\n" ([''
#type database DBuser auth-method optional_ident_map
local all all peer map=superuser_map
'']
@ -42,9 +42,9 @@ in
(map (slaveName: let slaveNode = nodes.${slaveName}; in
"host replication replication 172.19.${toString slaveNode.zone}.${toString slaveNode.id}/32 md5"
) mapping.db.slaves)
++ lib.optionals (builtins.elem myName mapping.db.slaves) [''
host replication replication ${masterIP}/32 md5
'']));
++ lib.optionals (builtins.elem myName mapping.db.slaves) [
"host replication replication ${masterIP}/32 md5"
]));
ensureUsers = [{
name = "replication";
ensureClauses.replication = true;