From 64cf0b71502fa3983f268bb5c3d52189e7ed9671 Mon Sep 17 00:00:00 2001 From: Andrew Lubawy Date: Fri, 29 Nov 2024 22:15:57 -0800 Subject: [PATCH] Use optional instead of mkIf to construct list --- modules/security/pam.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/security/pam.nix b/modules/security/pam.nix index 76cd893e..1873b3b0 100644 --- a/modules/security/pam.nix +++ b/modules/security/pam.nix @@ -51,10 +51,10 @@ in { environment.etc."pam.d/sudo_local" = { enable = isPamEnabled; - text = lib.concatLines [ - (lib.mkIf cfg.enablePamReattach "auth optional ${pkgs.pam-reattach}/lib/pam/pam_reattach.so") - (lib.mkIf cfg.enableSudoTouchIdAuth "auth sufficient pam_tid.so") - ]; + text = lib.concatLines ( + (lib.optional cfg.enablePamReattach "auth optional ${pkgs.pam-reattach}/lib/pam/pam_reattach.so") + ++ (lib.optional cfg.enableSudoTouchIdAuth "auth sufficient pam_tid.so") + ); }; system.activationScripts.pam.text = let