~ $ sudo nohup nice whoami
nohup: ignoring input and appending output to `nohup.out'
~ $ sudo cat nohup.out
root
The difference between the first and second way you've done it is who owns the nohup.out file. sudo first will make it owned by root, nohup before sudo will make it owned by your user.