We investigate the 1140 nm magnetic dipole transition of thulium atoms trapped in solid argon and neon. These solids can be straightforwardly grown on any substrate at cryogenic temperatures, making them prime targets for surface sensing applications. Our data are well described by a splitting of the single vacuum transition into three components in both argon and neon, with each component narrower than the 0.8 nm spectrometer resolution. The lifetime of the excited states is 14.6(0.5) ms in argon and 27(3) ms in neon, shorter than in vacuum or in solid helium. We also collected visible laser-induced fluorescence spectroscopy showing broader emission features in the range of 580-600 nm. The narrow infrared features in particular suggest a range of possible applications.