If you are lucky, the module is compatible and provides a package option, then you just need to set that.
If you are less lucky, the module is compatible but does not provide a package option, then you need to use an overlay to replace the correct package.
If you have really bad luck the module isn’t compatible at all, then you need to “replace” the module by disabling the old and importing the new. See NixOS - NixOS 21.11 manual
@gador do you have any suggestion here? I don’t see any package option. I’d love to get pgadmin4 on my system but I can’t migrate to unstable at this time. I’ve been using import to install unstable packages as needed.
I can try an overlay or disable/import but I’m still pretty new to NixOS so I’d have to learn how to make that happen.
Unfortunately, I never encountered an situation, where a module and package was introduced on a version, where I am using a different one. I think part of the problem is also that the module was introduced in unstable as well (and din’t exist before).
I am also wondering, why the usual route of installing the package from unstable doesn’t seem to work for you. I have been using pgadmin4 without the module for a while.
Maybe your version of unstable is too old? pgadmin4 was just recently added as a package…
I have no idea where that port comes from. pgadmin4 connects to localhost:5050.
I’d suggest you enter “pgadmin4” in the terminal and post the output. Please be aware that pgadmin4 requires the path “/var/lib/pgadmin” and “/var/log/pgadmin” to exist and be writable by the user, who runs pgadmin4.
I personally just created the folders and chowned the paths to the current user.