I don't have a generator for the whole house, but the power goes out here often in the winter. Sometimes for days at a time.
Can't go without heat for long when its -20 outside, so the first time I just cut the end off an extension cord and wired it to the gas furnace directly. Plugged into my tiny Honda generator and had heat. Also plugged in the garage heater.
Just have to make sure you disconnect the regular power so when the electricity comes back on, you don't fry stuff lol
I've since then wired up something more permanent