Here you go:
http://www.droid-life.com/2011/12/16/how-to-unroot-the-galaxy-nexus-re-lock-the-bootloader-and-return-to-a-factory-state/
I tried it and it wiped everything including the contents in the sd card. So when you use it, you might want to back your stuff up.