You're in luck... I own both a Xperia Z and a Nexus 5.
Performance
Firstly, the N5 is significantly faster. That thing is flipping quick.
The XZ isn't slow, but it isn't near the N5 in speed.
Sound
The sound quality on my XZ is bad. I'm not sure if mine is faulty, or it's just because of the waterproofing on the speaker.
The N5 speaker isn't brilliant, but it is better.
For headphone performance, the XZ is noticeably better, even without ClearAudio+ activated
The music playing application is the main issue with music on the N5. I hate Google music (Sure, I could simply use a different app, but still), it is frustrating to use and just plain annoying. Walkman, to me is the best music player by far, perhaps just my opinion, but you may value it anyway.
Screen
This is where it gets tricky.
I'm sure you've heard complaints about Sony's TFT displays, saying their viewing angles are bad, I however, very much like the XZ display.
To me, the display of the XZ is very realistic. The colours look real, the text looks sharp.
But the display of the N5 is also very nice. Better viewing angles (if you're into looking at your phone at weird angles.)
The colours don't look as real, but nowhere near as fake as that of Samsung. The screen is colourful, and definitely very good.
The ROMs of these two phones suit the screens very well. Sony's rom is largely black & white, with greyish gradients. The wallpapers are landscapes that really go well with the screen.
The N5 has an interface that is made up of 'synthetic' backgrounds - abstract, computer-made images that are colourful. The screen suits it very well.
I've tried swapping the wallpapers, and they don't work as well on each others screens.
Interface
Much like the screen, this is personal preference. I like the small app feature of the XZ, very useful.
I love the XZ interface in general, whenever I try to use AOSP, I just come back to the XZ.
The AOSP interface is good, but to me it just isn't as good.
Camera
I don't use the camera much, so I don't have much of an opinion. I just know that they are both good.
Build Quality
Don't assume that the N5 build quality is bad. I was actually very surprised by its build quality.
It feels solid, of an appropriate weight. Very impressive.
The N5 is shaped in a way that fits your hand better than the XZ - it feels smaller than what it actually is, which I like.
The build quality of the XZ is brilliant. Certainly something to boast about. Hell, the thing is water resistant. How many phones have that?