Duke Energy has agreed to a $2.5 million settlement with Virginia over a coal ash spill that coated 70 miles of the Dan River in gray sludge, state environmental officials announced Friday. The settlement drew immediate criticism from a water protection group, while the hardest-hit locality — the city of Danville — continues to negotiate with Duke. The Virginia Department of Environmental Quality said the settlement would include $2.25 million in environmental projects that Duke would perform in communities affected by the spill in February 2014. The spill originated in Eden, N.C., but affected areas in Virginia. The settlement is subject to approval by the State Water Control Board. The Roanoke River Basin Association said that the full environmental impact of the spill was still unknown and that the settlement did not rise to a “transgression of this magnitude.” In February, Duke and federal prosecutors said the energy giant had agreed to plead guilty to violations of the Clean Water Act and pay $102 million in fines, restitution and community service.