If only it was nukes. I'm afraid we're more likely to go out with a whimper. The fertility rates have plummeted and there's no reason to believe those will rise back to replacement level.
The idealized Star Trek society of production automation and exploratory self fulfillment might only be possible, and sustainable, if we are a billion people.
That is still plenty enough people to continue our ever accelerating and vast exploration of culture, science and space.