This firm do bulbs for boats and caravans with a voltage range 10 - 30 volt DC, but my wife's e-bike is 36 volt and mine is 48 volt, so would need some thing to reduce the voltage.
So I use battery lamp for my bike rear, the front light came with bike, and yes it would be nice if all came from one battery, I return home with two helmets, two helmet controllers, two bikes, radio, camera, phones, watch, and a rear lamp all needing charging, seem to run out of USB outputs as most seem to be USB, however not really worth trying to wire from the 48 volt for rear lamp, just knocking one off the list of things to recharge does not seem to make sense.
Odd German rules with dynamo, in UK the reverse was true, the old hub dynamo (really an alternator) did not have enough output for EU laws and it would stop working when you stop, and the clip on dynamo could damage the tyres, so we moved to battery. Personally I did have a mixture.