Add postgres to my Java proj

Hi. I’ve a project java and I want to add Postgres.

How may i do?
TNX

I’ve try with

config.services.postgresql = {
enable = true;
enableTcp = true;
};
packages = [ … pkgs.postgresql ]

but noting… idx go in error

Can you replace config.services.postgresql with services.postgres like the above please?
Also curious why you tried config.services.postgresql. Wondering if we need to improve our docs somewhere.