Dissolve the yeast in the milk.
Place both flour varieties in a bowl and make a well in the centre.
Pour the yeast and milk into the well, mix in the flour from the edge and leave to stand for 15 minutes. Add salt, cheese and the butter. Mix everything with the remaining flour and knead to a smooth dough. Leave the dough, covered, for 45 minutes until the surface shows cracks.
Prepare all ingredients for the topping.
Grease a baking sheet with butter.
Roll out the dough on a lightly floured surface slightly larger than the baking sheet. Cover the sheet with the dough, form a rim around the edge and leave the dough covered again with a cloth for 30 minutes.
Finely grate the Emmental.
Peel the onions, cut in half and cut into thin strips. Wash the leek and cut into thin rings.
Wash the herbs, shake dry and finely chop the leaves.
Melt the butter in a pan and fry the onions. Add the leek, cook briefly, then add the stock. Season with salt, pepper and nutmeg and mix in the herbs. Allow the mixture to simmer for 8-10 minutes, then set aside and allow to cool slightly.
Preheat the oven to 200°C (180°C fan, gas 6). Sprinkle the dough base with half the grated cheese. Add the onion and leek mixture, sprinkle with the remaining cheese and the peanuts. Beat the eggs in a bowl with the whipped cream, salt and pepper. Spread the mixture over the onion and leek mixture. Bake the tart in the oven for 40 minutes until golden brown.