Unfortunately second-order effects make rooftop solar less desirable than you'd think. In urban areas built to adequate densities (> 100 residents per acre) there's not enough roof area to power those residences, so you need the off-site generating resources anyway. Denser development has significant demand efficiency payback, but it always reduces the ratio of on-site solar generating resources per capita.
On the other hand you also have the phenomenon that after a person puts solar power on top of their little detached single-family house they start yammering about "solar access rights" to stop the construction of even slightly taller buildings nearby. Boulder, Colorado is ground zero for this kind of stupidity, see their "solar access protection" law which is as naked an act of NIMBY greenwashing as anyone has ever seen.
https://www-static.bouldercolorado.gov/docs/PDS/forms/815_So...