I’m new to NixOS. I’m currently trying to make a config for 2 of my servers that I’ve been working on for the last 3 days.
I already migrated a lot of stuff from my Arch Linux install scripts into NixOS, but I can’t figure out how people are intended to modify their /etc/pam.d/passwd.
I am currently using lib.mkForce in my config to overwrite my /etc/pam.d/passwd with the following:
I also installed the package libpwquality which should provide pam_pwquality.so as far as I can tell from their source code.
I however always get the following error when running passwd as root:
passwd: Module is unknown
passwd: password unchanged
I’d of course prefer actual options inside security.pam over overwriting /etc/pam.d/passwd. But it doesn’t seem like my configuration is supported at all.
In Arch Linux it works fine and my configuration also mostly matches their wiki entry for enforcing strong passwords.
If anyone is willing to help me with this and clear thing up, that would be greatly appreciated! I’ve spent a lot of time trying to find any solution to enforcing strong passwords on NixOS, but didn’t find any.
Have a nice week and thanks in advance for your help