6 tablespoons (1 stick) butter, plus 2 tablespoons for eggs
1/4 cup all-purpose flour
2 cups milk
2 tablespoons Dijon mustard
3/4 teaspoon salt, plus more for seasoning
1/2 teaspoon pepper, plus more for seasoning
1/2 teaspoon freshly grated nutmeg
10 to 12 slices white bread
3/4 pound deli ham
1 1/2 cups (6 ounces) grated Gruyere, reserve some for top of casserole
1. Preheat the oven to 400 degrees F. Grease an 8-inch square baking dish.
2. Melt 6 tablespoons of butter in a large skillet over low heat until bubbling. Whisk in the flour and cook for 1 minute. Slowly whisk in the milk and cook until thick and bubbling, 3 to 5 minutes more. Whisk in the mustard, salt, pepper, and nutmeg.
3. Pour a thin layer of the sauce into the prepared baking dish and cover it with 5 or 6 slices of the bread, then slices of the ham and an even layer of the Gruyere. Repeat the layers once more, ending with a third layer of sauce to cover all. Bake the casserole for 30 minutes. Remove it from the oven and cut into 6 equal pieces.
4. Working in 2 batches, melt 1 tablespoon of butter in a large skillet over medium-high heat. Crack 3 eggs into the skillet and season with salt and pepper, to taste. Cook until the whites are nearly set, about 3 minutes. Carefully flip the eggs and continue cooking until the whites are completely set, about 1 minute more. You're going to top each portion of the casserole with a fried egg. Repeat with the remaining 3 eggs and 1 tablespoon butter. Top with Gruyere and it in the oven for a few minutes until cheese melts.