nixos/modules/base/sudo.nix

16 lines
493 B
Nix
Raw Permalink Normal View History

2024-03-05 22:57:41 +01:00
{...}: {
2024-03-05 22:17:26 +01:00
security.sudo = {
# Only allow members of the wheel group to execute sudo by setting the
2024-03-06 21:37:39 +01:00
# executable's permissions accordingly. This prevents users that are not
2024-03-05 22:17:26 +01:00
# members of wheel from exploiting vulnerabilities in sudo such as
# CVE-2021-3156.
2024-03-06 21:37:39 +01:00
execWheelOnly = true;
2024-03-05 22:17:26 +01:00
# With great power comes great responsibility, we get it.. Also means we
# don't have state in /var/db/sudo/lectured.
2024-03-06 21:37:39 +01:00
extraConfig = ''
2024-03-05 22:17:26 +01:00
Defaults lecture = never
'';
};
}