How to make Pam work in single-user install?

I’m running Fedora 30 + Nix single-user install. Everything is great except for sway lock, which does not unlock, and I’ve tracked it down to PAM not working.

With Fedora pamtester, pamtester login <username> authenticate works great, but with nix-installed pamtester it gives me authentication errors.

How can I make PAM work for nix-installed software?