Another option is freezing.
Freezing works well for nuts and spices.
Especially if you put them in canning jars. No freezer burn.
As for spices, many of the common spices are perennials. I have in my garden here in NY thyme, lemon thyme, oregano, sage, chives. I by a rosemary plant every year. Basil is ridiculously easy to grow. I tried marjoram but don’t know yet if it’s cold hardy enough for NY winters.
I also grow a crop of garlic every year which is resistant to everything and always does well.
The kind I like best is Great Northern. It produces huge bulbs and it keeps very well.
http://www.territorialseed.com/
This is the time of year to order and plant your garlic.