This is one thing I rarely seen brought up in discussions of nuclear power. If every building had its own power source, then the grid no longer becomes a viable target. Funding for national security should go towards putting solar on every rooftop.
This needs a full analysis, but I suspect it is far more costly than the grid while being less reliable overall. Ukraine because they are at war is a partial exception, but even in their case it probably makes sense to fix the grid where possible and when the grid is down greatly reduce energy use to minimize the need for local power.
Batteries are expensive. Solar is expensive. By having a grid you can trade energy around. When your sun is shining you send some someone elsewhere (very far away) under clouds, then when you have clouds you get energy from them. In this way you both need much less batteries and/or much less need for solar cells (that sometimes will not produce used energy because your batteries are fully charged)