A shipyard worker who set fire to rags aboard a nuclear submarine because he wanted to go home was sentenced to a little more than 17 years in federal prison Friday for the blaze that transformed the vessel into a fiery furnace, injured seven people and caused $450 million in damage.