Preheat the oven to 350 degrees F.
Toss the nuts with the oil, sugar, Chinese five-spice powder and salt.
Lay the nuts in an even layer in a baking dish. Bake until lightly browned, stirring every 5 minutes or so to make sure the nuts cook evenly, 15 to 20 minutes.
For savory chili nuts, toss the nuts with 2 tablespoons peanut oil, 2 teaspoons chili powder and 1 1/2 teaspoons kosher salt, then finish the recipe.