Given I installed an Emacs package with Nix (e.g. emacs28Packages.pdf-tools), how set an Emacs Lisp variable (e.g. pdf-info-epdfinfo-program) pointing to the executable (e.g. /nix/store/mx3rg8a3f9zqw0clqgb3y466wvyr8qnv-emacs-pdf-tools-20220214.344/share/emacs/site-lisp/elpa/pdf-tools-20220214.344/epdfinfo) if the package doesn’t link the binary to bin or make it available in $PATH in another way? When it is in $PATH, I use the (file-truename (executable-find executable-name)) to find it’s actual path in /nix/store and set it.
Besides epdfinfo, I also have this issue emacsql-sqlite (emacsql-sqlite-executable).
have home-manager write out a file in a known path (in my case $XDG_CONFIG_HOME/doom/home-manager.el) that does the setq bits for the various binaries. Then load it from your config.
alternatively, create a wrapper for launching emacs that injects the various binaries into the path and the various emacs components will then auto-detect the binaries since they are on the $PATH.