I hope so. So I add something like this:
users.users.dong = {
isSystemUser = true;
# isNormalUser = false;
extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user.
};
security.sudo.wheelNeedsPassword = false;
security.sudo.configFile = ''
dong ALL=(ALL) NOPASSWD: ALL
'';
users.users.dong.group = "dong";
users.groups.dong = {};
But still, when restart after nixos-rebuild switch && reboot
, I am stopped by the login UI, if input nothing and press ENTER directly, it would tell me I have the wrong password number.
I’ve also tried to use isNormalUser = true;
, but nothing changed.
(Actually, I’ve tried to install NIXOS without setting root password by nixos-install --no-root-passwd
, then I can’t login anylonger, so I have to reinstall system with a root password.)
referece