If such organisms lived on Mars, they would find a ready supply of nutrients:
hydrogen (either produced in the serpentinization process or
diffusing into the soil from the
atmosphere) plus carbon dioxide and carbon monoxide (in the rocks or from the
atmosphere).