How can I get Emacs pdf-tools working?

A few things to check. What is the value of pdf-info-epdfinfo-program? It should fall back to epdfinfo in the same directory as pdf-info.el: https://github.com/politza/pdf-tools/blob/c510442ab89c8a9e9881230eeb364f4663f59e76/lisp/pdf-info.el#L85-L86 If epdfinfo exists in this directory, it should work.

On my system it looks like this:

pdf-info-epdfinfo-program is a variable defined in ‘pdf-info.el’.
Its value is
"/nix/store/vdx3pvn3ghndyvrdrq8hc11r5wa708bb-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20200512.1524/epdfinfo"

Maybe the pdf-tools package is also installed outside of nix, and this is conflicting. I think list-load-path-shadows will show you if you have a package defined in multiple locations.

This is how I have pdf-tools working. I have an overlay that looks like this:

self: super:
{
  emacsWithConfig = super.emacsWithPackages (epkgs:
    (with epkgs.melpaPackages; [
      pdf-tools
    ])
  );
}

In my emacs config, I call (pdf-tools-install) via use-package:

(use-package pdf-tools
  :init
  (pdf-tools-install))