You are logged-in automatically as nixos . The nixos user account has an empty password so you can use sudo without a password.
(Not sure if it is for the ISO or a new build with nixos-install/nixos-rebuild)
Searched all other occurrences of “login” within nixos manual without any success.
I know that for the OVA (VM image) the login is “demo” and the password is “demo” …
The VM does not have any data from your host system, so your existing user accounts and home directories will not be available unless you have set mutableUsers = false . Another way is to temporarily add the following to your configuration:
Important: delete the $hostname.qcow2 file if you have started the virtual machine at least once without the right users, otherwise the changes will not get picked up. You can forward ports on the host to the guest. For instance, the following will forward host port 2222 to guest port 22 (SSH):