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:
parent
49bdb77fac
commit
64cf0b7150
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue