Someone correct me if this isn't right but...
My bike came with a 12v socket already wired in, and its wired into the headlight circuit. Since the headlight is only on when ignition is on, connecting both +ve and -ve wires into this circuit would acheive what you want. And it shouldn't draw too much power to affect light output.
Alternatively you could wire it up as you already did, and just add a switch to turn power on/off manually
__________________
|