I've got two little charging alternators run by belt drive from the main engine, just like the ones you have on a car, for charging the batteries. There's also a bloody great 5KVA Electrolux alternator, also belt-driven from the engine, that supplies 240V to the domestic wiring circuit; but that needs you to run the main engine at a constant 800 RPM, which makes it useless for operating while cruising, and uncomfortable for using while moored up; my Beta Tug engine is jolly nice, but it is Very Noisy Indeed.
So I've got a dinky little Honda 240V generator. Suzanne off Electra sold it to me for a good price, when she gave up Electra recently.
I put it up on the back deck, and away it chugs, a distant rumble as I sit at my desk. It does not cause Men Of A Certain Type to stop and make admiring noises as the Beta engine does, but I'm cool with that.
Here's the charger, topping up the domestic batteries....
...and here's me, blogging away while the laptop charges!