The district court has jurisdiction to decree a dissolution of marriage when at the time of filing the petition either party has resided in this state for at least six months immediately preceding the date of the filing and has a domicile in New Mexico. As used in this section, “domicile” means that the person to whom it applies:
NMS § 40-4-5