In the given scenario above, Turkey attacks first, in which case Article 5 would not apply to a retaliation.
This lack of blaming is partly why Turkey and Greece had to sign at exactly the same time, so that neither could take advantage of being able to attack the other whilst being themselves shielded by NATO.
“The Parties agree that an armed attack against one or more of them in Europe or North America shall be considered an attack against them all…” -
Arguably, the text of Article 5 doesn't have to, since an act of aggression breaches the obligations of Articles 1 and 2, as well as the pre-existing obligations which the Treaty explicitly does not alter under Article 7.
Otherwise I struggle to understand how any NATO member could’ve engaged in any of the overt or covert expressions of military force in Iraq 2003, Vietnam, Cuba, Iran, Guatemala, Chile, Egypt, or Algeria to name but a few.
A nuclear attack by Russia on Turkey would not be merely legally and abstractly an attack on the US under Article 5 of the North Atlantic Treaty which it would do massive irreparable damage to US credibility to ignore, but would almost certainly be a nuclear attack on US forces in the direct and literal sense.