Generally speaking, you should use the username root
and the password you specified at the very end of the installation process.
Alternatively, you can create a user in your configuration.nix and supply a hashed password. However, that isn’t required. If you want to try that instead you can do it like this:
users.users.dalto = {
isNormalUser = true;
hashedPassword = "$6$sxrNsu3.EwRXYAAG$flowzjKcDepdPSqA5d4Y6y/HzupxndqmrcjwExbR7H05PgAOo91Q2yXGsdmavXRZpM8ROEcN9pVNhnmZA2NIo.";
extraGroups = [ "wheel" ];
};
To generate the password hash you use mkpasswd -m sha-512
, for example:
$ mkpasswd -m sha-512 password
$6$sxrNsu3.EwRXYAAG$flowzjKcDepdPSqA5d4Y6y/HzupxndqmrcjwExbR7H05PgAOo91Q2yXGsdmavXRZpM8ROEcN9pVNhnmZA2NIo.