Preheat oven to 425°F and spray two standard doughnut pans with gluten free cooking spray.
Whisk together flour, sugar, cinnamon, nutmeg, baking powder, baking soda, and salt in a large bowl.
Combine buttermilk, eggs, melted butter, and maple extract in a medium bowl. Add to flour mixture and fold in just until incorporated. Fold in the apples and walnuts.
Spoon batter into a pastry bag and snip about 1 inch from the bottom. Alternatively, put batter into a large zip top bag and snip an inch from one of the bottom corners. Fill each doughnut cup 3/4 full - this recipe will make approximately 9 doughnuts (or 12 thinner ones).
Bake for about 8 to 9 minutes, until the tops spring back when touched. Twist doughnuts in pan to loosen and turn them carefully out on a wire rack to cool completely. Set rack with cooled doughnuts over a piece of waxed paper or foil for easier clean up.
Make the glaze. Combine maple syrup, butter, and salt in a saucepan and bring to a boil, stirring until butter is melted and mixture is smooth. Reduce heat to low and simmer for 2 minutes longer. Remove saucepan from heat and whisk in powdered sugar, maple extract, and milk or heavy cream. Let cool for 5 minutes to thicken slightly, then whisk in milk until smooth. Dip doughnut tops into glaze, sprinkle with flaky salt, and let glaze set before serving.