For the crust:
Preheat the oven to 375°F. Combine the flour, salt, and Parmesan in a food processor and pulse a few times to combine. Add the butter and then pulse quickly about 20 times, or until the mixture is a sandy texture.
With a few more pulses, blend in the ice-cold water. The dough should stick together when you pinch it between two fingers.
Pour the crumbly dough into a 14 x 4-inch rectangular pan or 9-inch round tart pan with a removable bottom. Press the dough firmly up the sides of the pan. Then press the bottom to form a uniform base. Chill for 15 minutes.
Remove the tart shell from the refrigerator and poke it a few times with a fork. Place it on a baking sheet and slide the tart pan onto the oven’s middle rack. Bake for 15 minutes and then use a fork to poke any areas that may be bubbling up. Bake for an additional 10 minutes. Remove from the oven and set aside.
For the filling:
While the crust chills, prepare the filling. Stir together the ricotta, egg, garlic, thyme, pepper, salt, Parmesan, and nutmeg until well combined.
While the crust bakes, sauté the bacon on medium heat in a medium skillet; stir often, until brown around the edges and just starting to crisp, 5 to 7 minutes. Remove all but 2 tablespoons of the bacon fat. Reduce the heat to low. Add the leeks to the pan with the cooked bacon and a pinch of salt. Sauté for 10 minutes, stirring often and separating the leeks, until they are soft and lightly browned in parts.
Pour the filling into the par-baked tart crust. Top with the bacon and leek mixture. Return to the oven and bake for 20 minutes, or until the custard is slightly puffed and golden around the edges.
Let the tart cool in the pan for 15 minutes before unmolding. Garnish with chives and serve warm or at room temperature.
The crust can be made ahead, baked or unbaked, and frozen for up to 1 month.