nixos/modules/base/sudo.nix
2024-03-05 22:17:26 +01:00

16 lines
525 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ ... }: {
security.sudo = {
# Only allow members of the wheel group to execute sudo by setting the
# executables permissions accordingly. This prevents users that are not
# members of wheel from exploiting vulnerabilities in sudo such as
# CVE-2021-3156.
security.sudo.execWheelOnly = true;
# With great power comes great responsibility, we get it.. Also means we
# don't have state in /var/db/sudo/lectured.
security.sudo.extraConfig = ''
Defaults lecture = never
'';
};
}