From f94eec282edd8c88665781ab6b758dc66de3390c Mon Sep 17 00:00:00 2001 From: Gregor Kleen <20089782+gkleen@users.noreply.github.com> Date: Sun, 9 Nov 2025 13:00:07 +0100 Subject: [PATCH] nixos/pam: fix infinite recursion --- nixos/modules/security/pam.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index c10449454c500..d313187d9fe9f 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -2312,8 +2312,7 @@ in environment.etc = lib.mapAttrs' makePAMService enabledServices; systemd = - lib.optionalAttrs - (lib.any (service: service.updateWtmp) (lib.attrValues config.security.pam.services)) + lib.mkIf (lib.any (service: service.updateWtmp) (lib.attrValues config.security.pam.services)) { tmpfiles.packages = [ pkgs.util-linux.lastlog ]; # /lib/tmpfiles.d/lastlog2-tmpfiles.conf services.lastlog2-import = {