Heat milk in a medium saucepan and in a separate saucepan, melt 2 tablespoons of the butter. Once milk is warm and butter is melted, add flour to butter and whisk for a minute or two. Add the onion and cook over medium heat for 2 minutes. Gradually whisk in the milk and bring to a boil, whisking. Continue this process until all the milk has been added and let it cook until the sauce thickens. Remove from heat and add the garlic powder, ground nutmeg and mustard and continue to whisk. Season the sauce with salt and pepper. Let cool.





Preheat the oven to 355 ℉/ 180℃.
Line a large baking sheet with parchment paper. Spread one-third of the cooled sauce on the first pastry, leaving a 1-inch border all around. Sprinkle half of the cheese on top and cover with half of the ham. Repeat the layering with another third of the sauce and the remaining cheese and ham. End with a final layer of sauce. Cover the pie with the remaining pastry and press all around the edge to seal. Crimp the edge decoratively. Using a paring knife, make small slashes all over the top of the pie, then brush all over with the egg wash. Refrigerate until chilled, about 20 minutes.





Bake the pie for 30 to 45 minutes, until puffed and golden brown. Let cool for 15 minutes before serving.

