If you have a look around you at the moment you probably won't be able to see much of the sky so a surprise detonation probably won't affect you, also cloudy/hazy skies attenuate the propagated flash energy considerably.

The blast wave moves at the speed of soundish so a blast 10 miles away would take some 45 seconds to arrive, quite a lot of time from seeing the flash to take some shelter from the ground wave or get out a vehicle and get into the curb to avoid translation.

It is not all doom and destruction.

During transition to war we used to wear one eyepatch so if we did get caught by the flash only one eye would be damaged.