diff options
| author | Malo Bourgon <mbourgon@gmail.com> | 2022-02-17 10:22:42 -0800 |
|---|---|---|
| committer | Malo Bourgon <mbourgon@gmail.com> | 2022-06-30 13:33:06 -0700 |
| commit | c1ac8e9b3df081a897a0a97f9927aee1ae9ccec3 (patch) | |
| tree | 41b8ccffd76e37d0cad089c5a90e77931c226932 | |
| parent | e5f24e97a7467e14032778bdf0265db6349c9fa3 (diff) | |
Use GNU version of sed from nixpkgs
| -rw-r--r-- | modules/security/pam.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/security/pam.nix b/modules/security/pam.nix index 7de766e..ac7603f 100644 --- a/modules/security/pam.nix +++ b/modules/security/pam.nix @@ -19,18 +19,19 @@ let let file = "/etc/pam.d/sudo"; option = "security.pam.enableSudoTouchIdAuth"; + sed = "${pkgs.gnused}/bin/sed"; in '' ${if isEnabled then '' # Enable sudo Touch ID authentication, if not already enabled if ! grep 'pam_tid.so' ${file} > /dev/null; then - sed -i "" '2i\ + ${sed} -i '2i\ auth sufficient pam_tid.so # nix-darwin: ${option} ' ${file} fi '' else '' # Disable sudo Touch ID authentication, if added by nix-darwin if grep '${option}' ${file} > /dev/null; then - sed -i "" '/${option}/d' ${file} + ${sed} -i '/${option}/d' ${file} fi ''} ''; |
