How to set up DBeaver local client on NixOS


I have no idea why I struggled to use export features in DBeaver for so long, but here is a quick and dirty way to set it up:

Get into the shell with postgresql. You might want to use another version, depends on the host you’re dumping from.

nix-shell -p postgresql

Get path to pg_dump.

whereis pg_dump

You will get something like /nix/store/hkhbalgmx1669niw8jg648vbqs3mdxkv-postgresql-17.7/bin/pg_dump. Copy it without the pg_dump at the end.

Open DBeaver, edit your connection settings. On the Advanced tab there will be a Local client setting. Click on it, select “Browse…”.

A pop-up will appear. Click “Add home” button and instead of allowing you to enter a path, it will call for the XDG portal.

Inex Code
art by MurNy
Great. Good luck opening /nix/store in the file picker.

If you are on GNOME, click on “Other locations” in the left pane, select “Computer” to open your /. Then, press Ctrl+V to open the path you’ve copied before and select it. This path will appear in DBeaver’s pop-up, just select it and press OK.

PostgreSQL dump will work now!