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" = {
|
environment.etc."pam.d/sudo_local" = {
|
||||||
enable = isPamEnabled;
|
enable = isPamEnabled;
|
||||||
text = lib.concatLines [
|
text = lib.concatLines (
|
||||||
(lib.mkIf cfg.enablePamReattach "auth optional ${pkgs.pam-reattach}/lib/pam/pam_reattach.so")
|
(lib.optional cfg.enablePamReattach "auth optional ${pkgs.pam-reattach}/lib/pam/pam_reattach.so")
|
||||||
(lib.mkIf cfg.enableSudoTouchIdAuth "auth sufficient pam_tid.so")
|
++ (lib.optional cfg.enableSudoTouchIdAuth "auth sufficient pam_tid.so")
|
||||||
];
|
);
|
||||||
};
|
};
|
||||||
system.activationScripts.pam.text =
|
system.activationScripts.pam.text =
|
||||||
let
|
let
|
||||||
|
|
Loading…
Reference in a new issue