Download Android SDK
"SDK Tools only" is ok enough, choose corresponding version based on your host to download. Here use Windows 7 as host
Just install it
Download Android L Preview package
Choose the image for Nexus 5 and download:"hammerhead"
Prepare Nexus 5
Power off Nexus 5
Press "Volumn down" and "Power" button to power on
Connect Nexus 5 to Windows through USB line
On Windows 7, flash Nexus 5
Find where the just SDK was installed. In fact mainly to find where the "fastboot.exe" was installed. On my test environment it's "c:\Users\USER\AppData\Local\Android\android-sdk\platform-tools\fastboot.exe"
Open Windows Explorer, go to the folder just mentioned above. Extract the just downloaded .tgz file to it. After extracted, you should see files like "flash-all.bat" are in the same folder of "fastboot.exe"
Open Command using Administrator permission, go to the folder just mentioned above. Run "flash-all.bat". Wait for some time (around 5min, depends on cases). Then Nexus 5 reboot. Now could disconnect the USB line.