Electronic structure of magnesium nitride-fluorides from first-principles calculations