No, the government isn't "on a largely ideologically driven understanding of climate change prevention". The shutdown of the nuclear reactors was decided by the previous government in 2011 and never reconsidered.
Yes, as part of the war against Ukraine, Russia cut their gas deliveries to Germany. We managed to find other suppliers, but at least short term, sport market priced for gas went high up. This has by now settled down to about pre-war prices. In parallel, the ramp up of renewables was accelerated. In Q1 2024, 60% of the electricity was renewable.