{ security.sudo = { enable = true; extraRules = [ { groups = [ "wheel" ]; commands = [ { command = "/run/current-system/sw/bin/nixos-rebuild"; options = [ "NOPASSWD" ]; } { command = "/run/current-system/sw/bin/nix"; options = [ "NOPASSWD" ]; } { command = "/run/current-system/sw/bin/systemctl"; options = [ "NOPASSWD" ]; } { command = "/run/current-system/sw/bin/reboot"; options = [ "NOPASSWD" ]; } { command = "/run/current-system/sw/bin/poweroff"; options = [ "NOPASSWD" ]; } ]; } ]; }; }