The update may or may not work, it depends on how much you've touched the system files. If you've just rooted it, the update should work. If not, you can flash the factory image (except for the data partition).
You'll probably lose root, but on a unlocked bootloader, that's nothing to worry about, as you can trivially re-root it.
Sent from my Nexus 5 using Tapatalk