You shouldn't need to add diodes if you do it the following way.
1. Tie one side of your relay coil to an auxiliary line (key on line) and tie the other side to a ground.
You might be able to find a unused fuse port on your fuse panel (a little easier if you can). To do this, using a meter, connect one wire of the meter to a known ground (my suggestion is the outer ring of your lighter plug) and turn your ignition on and off until you find one that works with your ignition. If you find a unused one you can plug a spade connector in where the fuse leg would slide in. ****remeber that this means this line is unfused and a fuse should be added (10 amps should be sufficient).
2. Tie in the relay's Common (C) to the power going to the light switch and the Normaly Open (NO) side off the relay to the line going to the headlights. Basically, the relay's Normaly open side is connected in parallel to the light switch.
Depending on your electrical knowledge this might or might not be enough for you to figure it out. It's kinda hard to explain in words, I'm more of a hands on type.
If you happen to know where you can get a wiring diagram for the headlight wiring and fuse panel layout for an 01 QX4/Pathfinder

. I will gladly try to give you an exact wire/wire color connection diagram.
Denis