No city or city-state in the history of the world was ever self-sustaining. An in-space colony (up to maybe millions of in-space colonies and stations and specifically functioned facilities in many thousands of group networks, in the asteroid belt and in orbits of every planet but Mercury (essentially colonizing every planet above the planet that can't otherwise be colonized)) would not have to be self-sustaining. Main source energy: At least in the beginning centuries, the sun. Main source material resource: The entire solar system of material resource outside the sun, Earth, and Mars. Main interdependent resource: Space ships and boats to the number of millions and, just maybe, billions. Human capacity: Potentially trillions to quadrillions atop a pyramid of other life brought out to and seeded out to space. Plenty enough energy, plenty enough material resource, and, hopefully in those trillions to quadrillions of humans (in all that energetic life complexity and activity), plenty enough inventive, entrepreneurial, and innovative minds.
There are several good books out on space colonies and space resources (the first and still the favorite of many, 'The High Frontier', by Gerard K. O'Neill. But my personal favorite remains 'Colonies In Space', by T. A. Heppenheimer (a book on my favorite colony type, the Stanford Torus)). There are, too, many good articles, illustrations, and even paintings, available on the internet.
It all begins one or more entrepreneurs and some backing from some willing government or governments. Proper reusable shuttles and shuttling to space to start with. Then following, proper, spin-gravitied stations in space such as the envisioned space hotel 'Voyager Station'. From there Lagrange orbital facilities, stations, and colonies.
There is talk of colonizing the Moon. I say that is idiocy. Only temporary occupancy mining and scientific facilities should be established on the Moon. A spin-gravited station in space would be a far better [permanent] habitat than anything on or in the Moon fighting the conditions of the Moon. And would have far easier, faster, access to the Earth. [High Frontier] stations would be far better links between the surface and resources of the Earth and the surface and resources of the Moon. That, orbital stations, also goes for Mars. Mars surface facilities would need support facilities in Mars orbit for decades at the very least. The equivalent of a cloud city, up to a cloud city-state, in orbit with shuttle transport between it and the surface.
Do a search on [Voyage Station] if you don't already know of it. It would be a fine, FINE, beginning.