Have everything off line when it hits. Generator off, as much unplugged as possible. Nothing connected to the grid at all.
If you are connected to the grid when it hits, a lot of your stuff is fried. The generator (not running) won’t help. A basic whole house surge protector might mitigate a few things, but it isn’t going to be rated for a full nuke EMP.
If your generator and what you want to power survives the hit, the big issue is going to be what is the generator going to use for fuel after your supply is used up? The local gas stations aren’t going to open for a good long time.
Note that wires and such act as the antennas for absorbing the EMP pulse and sending it down the line into transformers, your house, etc. So the longer the better and a utility grid makes a great antenna.
For the disabling the local jerk situation, you don’t have miles of wire and a huge pulse but you are a whole lot closer. The wiring in the car will pick it up and send it to all the nice little computer parts in a modern car and fry them.
While it all looks very doom and gloom for the nuke pulse scenario, there is a silver lining behind that mushroom cloud. Well, it probably won’t be as bad all over.
First of all, not all nukes are created equally. H-bombs do a really great job, ones like the North Koreans blasted are not anywhere in the same league by orders of magnitude.
Furthermore, you need an air burst. Preferably very high up in the atmosphere for an H-bomb. For a fission bomb, you go too high and it eventually becomes less effective. A ground burst will only fry part of a large city. Very few countries have the capability to burst H-bombs at high altitude over the US. Really just China and Russia in terms of enemies. At that point, it’s WWIII and EMP is the least of every human’s problems.
N. Korea or Iran setting off a smuggled in bomb in a city is “just” going to take out that city’s electronics for a few miles around. Hardly anything to worry about. Except for the blast, radiation, zombies, etc.