blob: 54cf63a89deebfe3abd4051ca1fb76d0f434f538 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
{ lib, config, ... }: {
options = {
doas.enable = lib.mkEnableOption "enables doas";
sudo.enable = lib.mkEnableOption "enables sudo";
};
config = {
security.sudo.enable = config.sudo.enable;
security.doas.enable = config.doas.enable;
security.doas.extraRules = lib.mkIf config.doas.enable [{
groups = ["wheel"];
keepEnv = true;
noPass = true;
}];
};
}
|