Per default, the nixos user does not have a password. You should be able to use sudo without one. You may change the password with sudo passwd nixos, after that you can set security.sudo.wheelNeedsPassword = true if you want to be prompted for it when using sudo.
I hope, that this answered your question. If not, please provide additional details about your problem
Originally posted by @nzbr in #71 (comment)
This should go to https://github.com/nix-community/NixOS-WSL/blob/main/docs/src/install.md directly as a precaution. Otherwise a user might after initial install deploy a configuration.nix without a password set and at the same time security.sudo.wheelNeedsPassword = true; set.
Guess who did exactly that :D
EDIT: Workaround wsl -d NixOS-WSL -u root and therein passwd nixos