nichts/modules/system/os/security/sudo.nix
Bloxx12 53aaa26fa1 flake: inherit explicitly from parts of lib
Instead of doing `inherit (lib) <something>``, all inherits now use
`inherit (lib.<subsystem>) <something>`, which is much nicer.
2025-04-09 16:13:31 +02:00

23 lines
552 B
Nix

{
lib,
pkgs,
...
}: let
inherit (lib.modules) mkForce mkDefault;
in {
security = {
sudo-rs.enable = mkForce false;
sudo = {
enable = true;
# We use the default sudo package, but with insults if we
# fail to provide the correct password
package = pkgs.sudo.override {withInsults = true;};
# Wheel user should need the password to execute sudo commands
wheelNeedsPassword = mkDefault true;
# BUT, only wheel users should be able to use sudo.
execWheelOnly = mkForce true;
};
};
}