Preheat the oven to 350°F.
Line a rimmed half sheet pan with parchment paper and scatter the nuts on top. Place in the oven until they are lightly golden brown and smell toasty, about 8 minutes. Remove from the oven (leaving the oven on) and set aside.
In a small saucepan over medium-low heat, melt the butter. Add the brown sugar and maple syrup and reduce the heat to low. Cook, stirring often, until the sugar has dissolved and the mixture has thickened slightly, 2 to 3 minutes. Remove the butter mixture from the heat and whisk in the salt, pepper, cinnamon, ginger, and cayenne pepper, if using.
Pour the butter and spice mixture over the toasted nuts. Use a rubber spatula to toss the nuts to ensure they are all equally coated. Return the pan to the oven and roast for 8 minutes. Stir the nuts again to evenly coat, then roast until the nuts are deeply golden brown and slightly sticky to the touch, an additional 5 to 7 minutes.
Let the nuts cool completely. As they cool, they will go from slightly sticky to very crisp. The cooled nuts can be stored in an airtight container at room temperature for up to 3 days, in the fridge for up to 1 week, or in the freezer for up to 1 month.
