How do we keep our roasted cashews from smelling bad eventually?
Presumably you are experiencing rancidity, due to oxygen.

While you have nitrogen flushed the bags at filling time, the bags are not impervious to oxygen diffusion.

A different type of bag (an "oxygen barrier" bag material) or package (glass jar, or metal can) and, in addition, (based on other packaging I have seen) oxygen absorbing packets inside the bag may be required for long shelf life. Either alone would probably extend the shelf-life somewhat.