Dovecot in NixOS’ nixpkgs does not seem to have been compiled with PostgreSQL support.
On NixOS
# /run/current-system/sw/bin/dovecot --build-options
Build options: ioloop=epoll notify=inotify openssl io_block_size=8192
SQL drivers: sqlite
...
On Debian
# dovecot --build-options
Build options: ioloop=epoll notify=inotify openssl io_block_size=8192
SQL driver plugins: mysql postgresql sqlite
...
None of the options in services.dovecot2
seem to be related to this.
How should I proceed? My goal is for Dovecot to be able to read users from a PostgreSQL db.