I3lock on nixos via home-manager, Authentication failure

Hi, I am using home-manager on NixOS and I am having trouble using i3lock.

When I run i3lock --debug and enter the valid password, I get Authentication failure. Note that when I run it as sudo and then use the sudo password, i3lock works properly. It’s when I run it as a user that it doesn’t work. I’ve double and tripled checked and even changed to a test password and it still says Authentication failure

I think it may be a pam issue but since it’s installed by nixos, I don’t know how to fix it.
Here is the pam file installed at /etc/pam.d/i3lock that is linked to the nix store.

# Account management.
account required pam_unix.so

# Authentication management.
auth sufficient pam_unix.so   likeauth try_first_pass
auth required pam_deny.so

# Password management.
password sufficient pam_unix.so nullok sha512

# Session management.
session required pam_env.so conffile=/etc/pam/environment readenv=0
session required pam_unix.so

You are probably running on unstable. There have been issues with PAM, please update your channels.

1 Like

This being the relevant issue.

2 Likes