A nuke going off in the atmosphere above a major city is perhaps the largest source of EMI we can generate. (A neigboring star turning into a quasar or something could be worse, but that's a 1-in-many-billions of years thing)
Even if the nuke is a large & modern one, it's still only going to knock out that city. The rest of the world can route around it just fine.
That city would have many electrical components that need replacement before the grid can be restored, but if you had your own source of electricity, and it wasn't damaged beyond what you can replace, then you can restore your node's blockchain just fine by catching blocks from Blockstream's satellites. Sending TXs might be a little sketchy, but technically you can use your wallet to create a transaction, write that TX# down on paper, and mail it or send it by carrier pigeon to someone who can put it back on the chain and 'spend' it.
I think mining facilities might be worse off; seems to me like the ASIC chips would get fried during such an event. -But most large mining facilities are nowhere near large population centers so the guy firing the nuke would literally have to target a mining farm to do that.