If we are hit by a nuclear attack and subsequent EMP, the last thing I'd be worried about would be my electronics
You dont need a nuclear weapon to create an EMP. You can design a purpose built device to make an EMP, but it will be more localised. It is also much cheaper to make than a nuclear device, so would be easier to create multple devices to work together to achieve a bigger result.