Deposition of thick nitrides and carbonitrides for sand erosion protection