Heat your oven to 425°F and lightly grease a nine-inch square casserole dish with non-stick cooking spray or butter.
Bring a large pot of salted water to a boil then add the pasta and cook according to the package directions until al dente. Drain the pasta and set aside until ready to use.
Meanwhile, melt the butter in a saucepan over medium heat. Add garlic, season with salt and pepper, and cook for about 30 seconds. Sprinkle over the flour, whisk in, and cook, whisking occasionally, for about one to two minutes to toast the flour. While continuing to whisk, slowly pour in two cups of milk. Add the Herbes de Provence and nutmeg and boil to a light. Cook, whisking frequently, until thick, about four to five minutes.
When the sauce has thickened, turn the heat down to low and whisk in the mustard, Pecorino cheese, and two cups of the Gruyere. Switch to a heatproof spatula or a wooden spoon and carefully stir in the cooked pasta making sure that every noodle is well coated. Pour half of the mixture into your prepared casserole dish, scatter on half of the ham, then layer on the remaining pasta and ham and set aside.
To make the topping, whisk the egg and two tablespoons of milk in a medium bowl. Season with salt and pepper and stir in the bread and the remaining half cup of Gruyere.
Top the casserole with this bread mixture and bake for 20 to 25 minutes or until golden brown and bubbly. Allow the mac and cheese to rest for a few minutes before serving. Serve and enjoy!