How to prepare?
A gun and few bullets should suffice. You should also research how to shoot yourself, so that you die instantly.
What about it?
Do you want to prepare one?
Start one first to get ahead of everyone
Step 0. Have enough food and water to survive at least a week without going outside.
Step 1. Don't die in the blast.
Step 2. Don't be outside when the fallout lands. Be underground or in the interior space of a large building.
Step 3. Avoid the fallout.
Step 4. Be useful enough to what's left of society that it's worth the effort to keep you alive.
Step 5. Pray that the combattants aren't vengeful and launch second and tertiary strikes.
Install a nuclear warhead onto an autonomous-acting bipedal weapons platform. This weapons platform will guarantee to launch its payload when it detects a nuclear missile that is targeting to hit its general vicinity.