Combine the flour, baking powder, sugar, and salt in a large bowl. Add the softened butter, eggs, vanilla, and lemon or orange zest. Add the ground nuts, if using.
Knead until the ingredients come together into a smooth, firm dough. Cover and refrigerate for at least 30 minutes.
Fit a meat grinder with a cookie attachment and feed the chilled dough through it, cutting the strips into your preferred length. Alternatively, use a cookie press. If you don't have either, shape the dough into small logs and use a fork to create decorative ridges.
Arrange the cookies on a baking sheet and bake at 190°C / 375°F for about 15 minutes, or until lightly golden around the edges.
Transfer to a wire rack and allow to cool completely. Dust with powdered sugar before serving.
Store the cooled cookies in an airtight container.