Robert Heinlein had a story The Year Of the Jackpot, about exactly this.
Ends with the Sun going nova.
It was the first science fiction story I ever read, and I was 11. I still remember the opening line. "At first Potiphar Breen did not notice the girl who was undressing."
I wonder if that's where Gibson got the term "the Jackpot" for the slow-motion catastrophe that overtakes future Earth in The Peripheral.