There’s security.sudo.wheelNeedsPassword = false;
if you want all users in group wheel
to never type a password.
If you only want to apply NOPASSWD
to myusername, then you probably want to use security.sudo.extraRules
.
security.sudo.extraRules = [
{ users = [ "myusername" ];
options = [ "NOPASSWD" ];
}
];
I’m not sure if security.sudo.extraRules
will merge with an existing list, or overwrite. Hopefully someone with better knowledge can clarify.