Polkit not working

Hi,
I am having issues with getting polkit to work on my nixos machine.
When I try to start gparted I keep getting this error: Authorization required but no authorization protocol specified
I can see that the polkit (pokitd + gnome agent) process is running and I am being asked for a password by gnome polkit agent, but when I keep getting that error message after typing inn the password.

Anybody got a idea?