Preheat oven to 200C/400F/Gas 6. Grease and line a 6in/15cm x 8in/20cm baking tin.
Blend the grated onion and bulgur wheat in a food processor until smooth.
Place the mashed potato, cinnamon and parsley into bowl. Add the bulgur and onion and mix until well combined.
Heat one tablespoon of the olive oil in a frying pan and fry the sliced onions and garlic for 4-5 minutes, or until soft. Add the walnuts and butter and cook for a further two minutes.
Spoon half of the potato mixture into the greased baking dish. Add a layer of the onion and walnut mix and then finish with the rest of the potato mixture on top.
Score the mashed potato in a diamond pattern with the tip of a small, sharp knife. Pour over the remaining olive oil and bake for 20-25 minutes, or until crisp and golden-brown. Remove from the oven and sprinkle over the nutmeg.