Rice is good for storing items that need protection from moisture...in WW2 that’s how they stored MANY things
In the Phillipines. ..
I bought 1/2 gallon canning jars at Wal-Mart and put pasta and nuts in them and vacuum sealed them.
There are attachments that you can get for vacuum sealing that goes over the mouth of the jar and seals it.
Without oxygen, and in a cool dark place, you can extend shelf life a lot.
Also, when you buy your stuff, check the expiration dates.
I was surprised to see bags of Nestle’s chocolate chips dated for two years out, in the bag.
Nuts, too.