My Nexus 4 from several years back keeps getting timely updates. And still works pretty well.
Hm, does it even still get updates? The last official image posted by Google is from end of 2015. https://developers.google.com/android/nexus/images#occam
Full Image https://developers.google.com/android/nexus/images#shamu? (Direct link) https://dl.google.com/dl/android/aosp/shamu-nbd90z-factory-9...
Over the air update https://developers.google.com/android/nexus/ota#shamu (Direct link) https://dl.google.com/dl/android/aosp/shamu-ota-nbd90z-78a93...