I did my headlight on alarm in the early 80's this way:
It works like this: If the driver's door is open and the headlights are on, BEEP!
SO, it won't buzz when letting out a passenger.
It might not work, if you have your lights on and happen to stay inside the car for hours after going to a park.
I put a buzzer in series with a diode.
The driver's door already had a diode to the dome lamp and it turned on the dome with a switch to ground,. My diode just 'OR' ed the buzzer to this switch.
the + end of the buzzer went to the headlight +12.
So, lights on, driver's door open - Buzz.
My car now, when you open the door with the lights on, they go off. I have to remember to do that if I stop for a long time. Also DRL's and lights are influenced by the parking brake.
My mom's car you can program it to do things, like turn off the lights after a certain interval. It shuts off the accessory connection to the ignition when you open the door. i.e. Turn off car, radio plays until door opened.
It's also smart and will not let your dome light run down the battery.
Both are a pain when you want to turn off your lights, so the deer will leave that's stooped in front of you. My car less so. I can turn off the engine and open the door and re-start.
Mom's car - Not sure what sequence would work.