A Faraday cage can block electromagnetic pulses, be they from a nuclear weapon or solar flare. This will keep the electronics shielded within from being fried. It is also able to block cell phone signals, wireless internet, radio, and television signals. They can not block the Earth's magnetic field, thus the reason a compass still works inside one.

You can build a home with chicken wire used in construction, with concrete sprayed over it or put over it with a mold. You can also shield just some rooms if you prefer, so your cell phones work in the rest of the house. You can also wait until you believe you are going to need to protect yourself, and then run chicken wire around electronics you want to protect, or along the inside of your home.