Geothermal energy and tidal power don’t come from the sun either. Hydroelectricity is half sun (evaporation) half Earth’s gravity. (Well, one could argue that without the sun we wouldn’t have liquid oceans.)