How to make a fabricator run on gas or electricity

Okay after trying a lot of different things I managed to get it working on a dedicated server and single player. I have updated the top post with the new setup.