There's also the cost of the diesel fuel (or whatever fuel you burn) to consider. With no native hydrocarbons on the moon, extracting them would be impossible. So they would need to be launched from earth, at many tens of thousands of dollars per kilogram as an ongoing cost.
The biggest challenge to the obvious solutions - either solar plus lots of batteries, or nuclear - would be to crack water into oxygen and hydrogen, and then burn them during the night. The challenge there is storing the hydrogen. But if you do that, basically what you'd be doing is using hydrogen/oxygen as an energy storage mechanism, e.g. as a battery. You'd need to use solar during the day to crack the water.