I you want headlights to only come on when key is in run position you could add an inline relay that is closed by key power but there are downsides to not being able to turn on headlights with key off