{ 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; }]; }; }