No, the cost of the new roof is not eligible for the 30% credit. The rest of the installation and all equipment/panel costs are eligible for the 30%.
https://www.irs.gov/pub/irs-dft/i5695--dft.pdfQualified solar electric property costs. Qualified solar electric property costs are costs for property that uses solar energy to generate electricity for use in your home located in the United States. No costs relating to a solar panel or other property installed as a roof (or portion thereof) will fail to qualify solely because the property constitutes a structural component of the structure on which it is installed. The home doesn't have to be your main home.
"No costs relating to a solar panel or other property installed as a roof (or portion thereof) will fail to qualify solely because the property constitutes a structural component of the structure on which it is installed."
@Ashby - Could this not be interpreted to say that, if the section of the new roof supporting the solar panels constitutes (for example) 40% of the roof, the taxpayer could include 40% of the roof's cost as part of the solar credit?