ctucx.git: nixfiles

ctucx' nixfiles

commit ddb55f9607c9c14658d8ceff9bde10425b8b5bd7
parent 48a2b33118605a4b9bd7536841f69d0c9551cff9
Author: Leah (ctucx) <git@ctu.cx>
Date: Tue, 17 Oct 2023 09:25:21 +0200

configurations/darwin/systemSettings: use option to enable TouchID for sudo
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/configurations/darwin/systemSettings.nix b/configurations/darwin/systemSettings.nix
@@ -9,16 +9,11 @@
     ];
   };
 
+  security.pam.enableSudoTouchIdAuth = true;
+
   system.activationScripts.postActivation.text = ''
     # Set the default shell to bash. MacOS doesn't do this like nixOS does
     sudo chsh -s ${pkgs.bashInteractive}/bin/bash leah
-
-    # Enable sudo Touch ID authentication, if not already enabled
-    if ! grep 'pam_tid.so' /etc/pam.d/sudo > /dev/null; then
-      sed -i "" '2i\
-    auth       sufficient     pam_tid.so # use TouchID with sudo
-      ' /etc/pam.d/sudo
-   fi
   '';
 
   system.activationScripts.extraSystemSettings.text = ''