You can use Nexus Root Toolkit, but I would rather do it manually.
I am using steps from this web site.
First download appropriate image from here. Extract it. Then download latest Android SDK, in my case it was this one. If you don't have it installed already then download Java, and install it of course.
After you finished installing Android SDK leave check box Start SDK manager checked like on picture I am not sure if we need this part, since in folder:
%APPDATA%\Local\Android\android-sdk\platform-tools
AppData is hidden folder...
in my case I couldn't find adb. Anyhow, I've left the check box checked, and was waiting for couple of hours (washed dishes, eating,...):
That will open new window Android SDK manager, just click install packages:
Add %APPDATA%\Local\Android\android-sdk\platform-tools to path in Environment Variables.
Open command prompt in a folder where you previously extracted the image, (in my case that was something like: E:\hammerhead-lmy48b) and execute:
flash-all.bat
and wait until files are not written to the device.
After signing in, to avoid automatic installation of applications in Get your apps & data, from restore from this backup choose setup as new device:
uncheck check box to Backup your phone's app: