I doubt a nuke or even a few million nukes could do more than scratch the surface of the earth -- the gravitational binding energy of the earth; how much energy is pulling it together, is 2.2e23 J. In comparison, a 1 megaton nuke has 4e15 joules of energy, only half of it goes into the blast. It would take over 100 million nukes placed in the most optimal position to destoy or crack the earth.
without the electronics and ballistic fuel/missile casing; a nuclear bomb could be created relatively inexpensively; perhaps mass produced for $1,000,000 per megaton. At this price, even if less than 25% of the energy was collected, electricity could be generated for 0.36 cents per kilowatt hour, a very low amount compared to conventional methods.