What do you have in mind as a "millions of years" power source?
At current rates, fossil fuels will last a few centuries, nuclear a few millennia.
Although geothermal would last for geological timescales, the estimated maximum output only covers current electricity use (~2 TW, well short of the ~17 TW total power use, and ideally we'd increase the minimum power use per person to get closer to European or American levels rather than keeping our current distribution).
The kinetic rotational energy of the earth would last us 400 million years.
Sun will last a few billion, but then we're no longer talking about extractive technologies.
At current rates, fossil fuels will last a few centuries, nuclear a few millennia.
Although geothermal would last for geological timescales, the estimated maximum output only covers current electricity use (~2 TW, well short of the ~17 TW total power use, and ideally we'd increase the minimum power use per person to get closer to European or American levels rather than keeping our current distribution).
The kinetic rotational energy of the earth would last us 400 million years.
Sun will last a few billion, but then we're no longer talking about extractive technologies.