LineageOS (ex-CyanogenMod)'s flavour of Android 7 works just fine [1] on Nexus 5.
On the other hand - yes, hammerhead is stuck on Linux kernel 3.4, which is no longer maintained, and current best effort to forward-port to mainline kernel [2] is far from complete.
Among other things this means that there is no workaround for Meltdown on this hardware, which it is likely vulnerable to. [3]