Some time ago, probably in the 1990s, I remember reading a story about a city that was going through a permanent drought, possibly from climate change or war. Two people were making the best of the situation, using a bike to provide cooling or power, growing plants. The city they lived in was packed with housing allocated by the government. IIRC the other tenant they were living with died. A family was assigned the other room in the place but instead took over the main room. This was possibly a short in a collection.
That is a shortened form of the linked novel.
The "roommates" are two friends, one a policeman, the other a retiree. Later, the girlfriend of the policeman moves into the appartment.
The story ends with "squatters" taking over the appartment.
The novel "Make Room! Make Room!" was the basis of the movie "Soylent Green."