Preheat the oven to 375°F (190°C).
Fit the pie crust into the tart pan, prick the base with a fork, and blind bake for 10 minutes with pie weights. Set aside.
Wash the leeks very well and slice them in thin slices, rinsing them again to make sure all the sand is removed.
Heat the olive oil or butter in a large pan over medium-low heat. Add the sliced leeks (white and light green parts of the leek only) and cook for 12 to 15 minutes, stirring occasionally, until soft and tender, not browned. Season lightly. Let cool slightly.
Whisk the eggs, crème fraîche, and milk together in a medium bowl until smooth. Season with salt, pepper, and nutmeg.
Sprinkle about two-thirds of the gruyère cheese directly onto the blind-baked crust.
Spread the cooled leeks mixture evenly over the cheese. Make sure you fill the crust generously with the leek mixture, but don’t overstuff it. The custard needs to cover it completely, so leave enough room for that.
Pour the custard filling over the leeks. Scatter the remaining gruyère on top.
Bake for 35-40 minutes, until just set with a slight wobble in the center and lightly golden brown on top. Don’t worry if it puffs up, that’s normal, it will drop down as it cools. To test if it’s done, you can insert a thin knife in the center. It should come out mostly clean, maybe with a very faint custard trace, not a wet egg mixture. Note: If the crust edges start browning too deeply partway through, loosely cover the edges with foil.
Let it rest for 10 minutes before slicing. After 10 minutes it will be still warm and mostly set for clean slicing.
Garnish with parsley or chopped chives.