Hi. I approved this PAM PR. I’d like to share some thoughts on this discussion.
1. The author did everything right. The author posted a clean PR. They included a release notes entry about the change. They got an approval from the maintainer listed in the PAM module. They posted a breaking changes announcement. (Edit: See replies.) When an issue was posted, the author engaged and offered to revert. I don’t think it’s productive to accuse the author of being self-centered or sloppy. (I especially don’t see the “self merge” as a problem. The author only merged after approval.)
2. This change helps security.pam
. The change was not, as some have suggested, a coordinated part of the broader PAM refactoring work. But it is in line with that work, because moving module-specific rules out of the core PAM module is one of the main objectives. The PR does not explain in depth why this change is helpful, but as the reviewer, I didn’t need that explanation.
3. The problem here is change management, not the end state. Requiring i3lock
rules to be enabled separately when rolling a custom module is fine. The issue is with how we got into that state. This change management problem is nixpkgs-wide.
4. It’s not an easy problem. We could not have simply added a warning, because that warning would have to be shown to every NixOS user. If we had an automated way to detect i3lock
users who weren’t using programs.i3lock
, then we would simply enable the PAM rules with that logic.
We also could not have added a stateVersion
check. Experienced maintainers would reject that approach as an abuse of stateVersion
. Personally, I think we should have an option versioning system so that we can change defaults more easily. But for better or for worse, the current consensus is that such changes should hit unstable with a breaking changes announcement instead. If you disagree with that approach, I’m with you! But you should not aim your frustration at the author who complied with the established approach.
How else could (for example) i3lock
usage be detected? And are those detection methods reasonable ways to enable PAM rules? I would find it surprising if simply adding a package to environment.systemPackages
would somehow modify the PAM stack.
5. The breakage only affected unsupported setups. The NixOS-supported way to use i3lock
is with the programs.i3lock
module. Using i3lock
and not using that module and not defining your own PAM rules is off the beaten path. I understand now that many users didn’t know that.
6. …or did it? The above was my impression from reading this thread and this issue. But services.xserver.windowManager.i3.enable
doesn’t seem to enable programs.i3lock
, and it does have i3lock
in the default value of extraPackages
. It would be great if someone who uses i3
could confirm that i3lock
can be used (prior to the breaking change) with services.xserver.windowManager.i3.enable
and no custom i3lock
module. If there are gaps like this in nixpkgs, we absolutely should close them, and it would be reasonable to temporarily restore these default PAM rules until nixpkgs is internally consistent.