1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Use optional instead of mkIf to construct list

This commit is contained in:
Andrew Lubawy 2024-11-29 22:15:57 -08:00
parent 49bdb77fac
commit 64cf0b7150
No known key found for this signature in database
GPG key ID: 8E98BAE1F49C2709

View file

@ -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