Doorways and window openings are set in the whitewashed walls. Periodically there are gaps in the roof that allow the passages to breathe and let in light. Certainly at the time I was there, you’d see the occasional light bulb set in the ceiling, usually outside a doorway. This suggests, to me anyway, that the lighting was provided by the owner of the dwelling at that point, rather than municipal lighting.
The old city has been declared a UNESCO World Heritage site. According to this Wikipedia article, the old town was depopulated through the 1990s. If true, then I’m sure it will rapidly fall into disrepair. Sites like needs need continuous habitation to maintain them. My Ghadames photos were taken in 1986.
Below is a color version of this image.