Preheat the oven to 200 C.
For the Bèchamel sauce: Warm the milk in a saucepan or in the microwave. Melt butter in a saucepan over medium heat, being careful it doesn’t brown.
Add the flour and stir quickly. Stir and cook the flour and butter mixture for 5 minutes. Slowly add a few tablespoons of the warmed milk, stirring thoroughly to combine.
Add the remaining milk and whisk until smooth. Cook until the bèchamel starts to bubble and thicken.
Take off the heat, stir in parmesan, nutmeg, Dijon mustard, and salt and pepper. Set aside while you assemble the sandwiches.
To assemble: Butter one side of each slice of brioche and place 4 slices buttered side down in an oven dish.
Spread each of these slices with 2-3 tablespoons of bèchamel sauce and two slices of ham.
Place the remaining slice of brioche on top, buttered side up, and spread with the rest of the bèchamel sauce.
Sprinkle with the grated gruyere cheese and bake for about 15 minutes, until golden brown.
When the Croque Madame sandwiches are nearly ready, fry 4 eggs until the whites are set and the yolks are still runny. Place a fried egg on top of each Croque Madame as soon as they come out of the oven and enjoy!