feat(sudo): configure sudo with nix modules

This commit is contained in:
Mohammad Rafiq 2025-07-14 19:19:02 +08:00
parent 79b83cfc70
commit 343f3d481f
No known key found for this signature in database

View file

@ -8,9 +8,12 @@ in
nix.settings.trusted-users = [ "@wheel" ]; nix.settings.trusted-users = [ "@wheel" ];
users.users.${cfg.admin.username}.extraGroups = [ "wheel" ]; users.users.${cfg.admin.username}.extraGroups = [ "wheel" ];
}; };
flake.modules.darwin.default.security.pam.services.sudo_local = { flake.modules.darwin.default.security = {
enable = true; sudo.extraConfig = "%admin ALL = (ALL) NOPASSWD: ALL";
reattach = true; pam.services.sudo_local = {
touchIdAuth = true; enable = true;
reattach = true;
touchIdAuth = true;
};
}; };
} }