Roast the hazelnuts or pecans in a pan over medium heat for 5 minutes until golden brown, then let cool for 3 minutes.
Using a hand mixer, knead together the flour, margarine, 50 g powdered sugar, 1 teaspoon cinnamon, salt, and cooled hazelnuts until combined. Let the dough rest for 10 minutes at room temperature.
Roll out the dough thinly and cut out star shapes, then place on a baking sheet lined with baking paper.
Bake in a preheated oven at 200 °C (392 °F) with top and bottom heat, or 180 °C (356 °F) with convection, for 10 minutes. Cool on the baking sheet for 2 minutes, then transfer to a wire rack to cool completely.
For the glaze, stir together 100 g powdered sugar, 1 teaspoon cinnamon, and 3 tablespoons water until smooth.
Dip the stars halfway into the glaze and place on a wire rack to dry for 15 minutes until the icing sets.