If you're into flashing you should buy nexus 5.nexus 5 is outdated. camera is the biggest trade off. you're getting much much better camera at lower priced phones.
Also if you're into flashing, buy xiaomi devices. they have warrenty even if you flash and root your phone or even if you brick your phone while flashing.
Warranty still applies if you flash despite what they say in ToS. Everything you do is reversible, unless you do something really stupid.