I can understand the simplicity of making solar panels a separate building, but the real world solution to space constraints is to make use of the rooftops. Make adding solar to the roof of a building an option for anything that has a flat-ish roof. So that'd be all unit storages, all assemblies (not robotic, because it lacks a roof), the captain's office, the assorted settlement services, the labs and possibly the datacenter. Not greenhouses or anything that's just industrial equipment.
Maybe do it a little different for the settlement, you could make a solar installer a dedicated service building, it would take the panels as an input and then solar would be added to the settlement roofs and service buildings over time. The installer building would consume maintenance for all the panels in the connected city.