Long-distance electricity transport is exponentially lossy, and it makes people dependent on vulnerable centralized infrastructure. So your first suggestion is more practical on a national/continental scale.
Solar panels could also be placed on parking lots of dead malls and other decaying suburban infrastructure.