Down here in the deep warm, moist south is was pretty common for people to store nails in jars, canning jars are good, with a little kerosene or other light oil added. Stored this way the nails stay good pretty much indefinitely.

A similar job done with a vacuum bag should last about as long as long as you chose the right bag, most bags are not entirely impermeable, and special care is taken to make sure anything sharp, like nails, won't poke any holes. Proper wrapping and selection of bag, multi-laminate bags come in a variety of designs and capabilities, should make it work well enough.

I would avoid adding any solvents or oils if you storing ammunition. Oil infiltration into the primer can make the cartridges unreliable. The best advice is to store them clean and dry or, if you feel a lubricant and corrosion protection is really needed, to use one of the dry protectants.