1Make the dough: stir the flour and 1/2 tsp salt together in a bowl. Rub in the cold butter with your fingertips until the pieces are pea-sized. Sprinkle in the ice water a tablespoon at a time, tossing until the dough just holds together when pinched.
2Press the dough into a disk, wrap it, and chill for at least 30 minutes.
3Heat the oven to 375°F. Roll the dough into a 12-inch round on a floured counter and fit it into a 9-inch pie dish, trimming and crimping the edge. Prick the bottom all over with a fork and freeze for 10 minutes.
4Line the shell with parchment, fill with pie weights or dry beans, and bake 18 minutes. Remove the parchment and weights and bake another 5 to 6 minutes until pale golden. Lower the oven to 350°F.
5While the shell bakes, cook the bacon in a skillet over medium heat for 8 to 10 minutes until browned but not brittle. Lift it out with a slotted spoon onto paper towels. Pour off all but 1 tsp of fat, add the shallot, and cook 2 minutes until soft.
6Scatter the bacon, shallot, and Gruyère evenly over the warm crust.
7Whisk the eggs, cream, milk, nutmeg, 1/2 tsp salt, and plenty of pepper until smooth. Pour the custard over the filling.
8Set the dish on a baking sheet and bake 35 to 40 minutes, until the edges are set and the center jiggles just slightly like gelatin. Cover the crust edge with foil if it browns too fast.
9Rest at least 15 minutes before slicing so the custard finishes setting. Serve warm or at room temperature.