Set a large pan over medium heat and add the pistachios and almonds. Toast, stirring occasionally, until the almonds are a shade darker and the pistachios are fragrant, 4 to 5 minutes. Transfer these to a large bowl.
Add the fennel seeds to the pan and toast until fragrant, 2 to 3 minutes. Add them to the same bowl. Repeat this process with all the remaining seeds. The coriander and cumin seeds will toast in 2 to 3 minutes, while the sesame seeds will take 6 to 7 minutes to get golden. The pan may smoke a bit from the fat it picked up from the nuts and seeds but don't mind it.
Add all the toasted seeds to the bowl with the nuts and let them cool for I to 2 minutes. Transfer to a food processor. Pulse until the mix is coarsely ground but not yet fine, 15 to 30 seconds. It should resemble the texture of coarse sand.
Return the mixture to the bowl, season with 1 teaspoon salt and the cayenne, and mix to combine. Taste and add more salt as needed. Store in a jar in a cool, dry place for up to 2 months.