USS Miami (SSN-755) had a bad fire while she was in dry dock at the Portsmouth Navy Yard. The fire, which was reportedly in the boat's forward compartments, took several hours to extinguish.
The question now is whether the boat is beyond economical repair. Even if the damage is repairable, it may have been severe enough that the boat will be decommissioned and left in the yard until Congress specifically allocates funds for repairing the boat. The reason for that is when one is talking about a very large sum of money to fix a casualty, taking it out of existing funding will have a hard impact on the funding of repairs and upgrades to the rest of the force.
There is precedent for that. When the USS Belknap burned down to the damage control deck in 1975, she was moored in the Philadelphia Navy Yard until funds were allocated to repair her.
Belknap was, at the time of her fire, a newer ship than the Miami. However, the Fleet is a lot smaller than it was 37 years ago and the Navy isn't going to part with a valuable asset like a nuclear sub unless it absolutely has to.