Yes, if you worked in NM and earned income while working in NM, then this would be considered NM sourced income. This applies even if you are a permanent resident of a state with no state income taxes (like TX).
According to the New Mexico Department of Revenue, if you are required to file a federal income tax return with the IRS and you are a nonresident of New Mexico with income or loss from New Mexico sources, you must file a NM state income tax return.