A guy over at xda forum has already rooted the Google nexus 5 with CF-Auto-Root.
How to Root Google Nexus 5:
1) Download CF-Auto-Root-hammerhead-hammerhead-nexus5.zip
2) Extract the ZIP file
3) Boot your Nexus 5 in bootloader/fastboot mode. [turning your device off, then holding VolUp+VolDown+Power to turn it on]
4) Connect your device to your computer using USB
5) Run root-windows.bat
6) Follow the on screen instruction to root your Google Nexus 5
For those wondering why their root hangs at “waiting for device”, Try this solution:
1. On your PC, Hold the Windows key and press Pause and open Device Manager in the top left.
2. See if there is a Nexus 5 with a Yellow exclamation point next to it. Mine was under a category called “other”.
3. If there is, download this: http://developer.android.com/sdk/win-usb.html#top
4. Extract that to a folder on your desktop
5. Go back to the Device Manager.
6. Right click the yellow exclamation Nexus5, and click Update drivers.
7. Browse my computer manually.
8. Point it to the driver folder on your desktop.
Wish this helps.