Preheat your oven to 180°C (350°F). Roll out the pie dough on a floured surface to about 3mm thick, then fit it into a 9-inch pie dish. Trim the edges and prick the bottom with a fork. Chill in the fridge for 15 minutes.
Line the chilled crust with parchment paper and fill with pie weights or dried beans. Bake for 15 minutes until the edges are just golden. Remove the weights and parchment, then bake for another 5 minutes to crisp the base.
While the crust bakes, clean the leeks thoroughly and slice into thin rings. In a large skillet, melt the butter over medium-low heat. Add the leeks along with a pinch of salt, then cover and cook gently for 15-20 minutes until soft and fragrant, stirring occasionally. They should become translucent and slightly caramelized.
In a mixing bowl, whisk together the eggs, heavy cream, salt, pepper, and a pinch of nutmeg if using. Grate the Gruyère cheese and set aside.
Spread the cooked leeks evenly over the partially baked crust. Pour the custard mixture over the leeks, then sprinkle the grated cheese on top.
Bake the quiche in the oven for 35-40 minutes until the filling is set and golden on top. The edges should be puffed and the center just slightly jiggly when gently shaken.
Remove the quiche from the oven and let it rest on a wire rack for about 10 minutes. This helps the custard set fully and makes slicing easier.
Garnish with freshly chopped thyme or parsley, then slice into wedges and serve warm or at room temperature, enjoying the tender leeks and melty cheese in each bite.