I've been looking into this myself, and depending on the length of your ride and how long you need to be electrically self-sufficient, power banks may be the cheaper and easier option.
Lights are by far the biggest draw on your power—my guesstimate is that a smartphone or bike computer draws about 0.2 W; a medium-powerful headlight draws about 5.5 W (about 27× as much). You can do the math on expected hours of use for each gadget, the gadget's power draw, and how big a power bank you'd need to cover that use: hours of use × draw in watts = power need in watt-hours. A big power banks weighs about 1 lb and has about 90 Wh capacity; by my math, that is enough to run one person's lights and other gadgets for almost 3 days if using them very intensively, or longer if used less intensively. Even if you go with a dynohub for your lights, it may make sense to use a power bank to run your other gadgets.