Dry roasting nuts and spices beforehand
Properly stored, dry roasted nuts should lose none of their flavour. Keep them in a well sealed container and they will be fine.

Spices, however, should be freshly toasted, because the point of doing so is to encourage them to release their flavourful oils.