Melt 6 tablespoons butter in a nonstick pan over medium heat. Then whisk in flour. Continue whisking and cooking for 2-3 minutes. The flour mixture will be thick.
Slowly whisk in milk, about 1/2 cup at a time. For the first cup, let the flour mixture absorb the milk before adding in more milk. It will first look like a paste, and then slowly thin out.
Continue to cook over medium heat until the sauce thickens. This will take about 5-8 minutes.
Once thick, whisk in the salt, nutmeg and ½ cup parmesan. Continue whisking until the cheese melts.
Remove from the heat and cool slightly while you get your other sandwich ingredients ready.
Assembling the sandwich
Line a baking sheet with a silicone mat and preheat your oven to 325 degrees F.
Cut the brioche into 8 thick slices. Lay out 4 slices and top with the sliced or shredded gruyere.
Next, top the cheese with the ham slices and a spoonful of bechamel. Top with the other brioche slices.
Gently spread the top side of brioche with the softened butter.
Preheat a large nonstick pan over medium low - medium heat. Place the brioche sandwiches into the pan with the buttered side down. While the brioche is browning, butter the second side of the brioche.
Cook for about 2 minutes, or when the bottom is golden. Once golden, flip the sandwich over and brown the other side.
Once the second side has browned, remove from the pan and place on the prepared baking sheet.
Top each sandwich with 2 tablespoons of béchamel and 1 tablespoon of parmesan cheese.
Place in the oven to melt the cheese, about 5 minutes.
Remove from the oven, top each sandwich with a fried egg and serve immediately!