Mismatch postgresql version

I tried to use postgresql to connect to my remote db which is on postgre server 17.4. However, the version of psql from nix pkgs is 15.10. I search for psql on NixOS Search , it says that the version of postgresql is 17.6, but I still get version 15.10 when add psql package to my environment.
Any way to fix this?