if you just need replication than I think you’re fine using what PostgreSQL provides already. Imho, there is no descriptive approach to set this up on NixOS, but anyhow it’s simple.
I was in need for a HA setup for PostgreSQL for some time. I read you post and was hoping that others have solutions based on NixOS. Unfortunately no-one replied. I played a little with streaming replication but found that for my use-case I need more than that. My research led me again to Patroni, which I already know from the Postgres Operator (k8s) which is also based on Patroni.
Because I did not found anything usable so far; I created my own NixOS modules: