As I recall, the Nexus 5 had a lot more complaints about battery life than does the Nexus 5x. It might be because there were a lot more Nexus 5 phones sold. I don't really know. I do like my 5x and I like running Android 7.
After posting this I found a new 5x for $365 Canadian
I also have the option of changing my cell phone plan.
I can pay $13.50 more a month and get a new Samsung galaxy s7 but my data would drop from 6GB to 4GB a month and I'll have to sign a 2 year contract.
Decisions, Decisions. I know I don't need the s7 but also want the 5 or 5x to last me a few years.
I LOVED my 5. It was my introduction to Android and it was a perfect one. Support for the 5 as far as updates go is no longer available, unfortunately. Don't know what the 5X's status is; however, these phones would still run fine without the latest updates. I have a friend who has a Nexus 5 and it still works well.
I would recommend the 5X, as I've heard a lot of great things about it. I'm kind of biased with having owned a Nexus 5 in the past lool.
5X launched with M, has N 7.1.1 now and will get O (8) before it's done being guaranteed updates, security updates will go until near the launch of P or after.
Just so you know -- the Nexus 5 is no longer getting security updates from Google, while the 5x has almost two years of security updates left, plus it's 64 bit (vs 32 bit for the Nexus 5).