Make pastry: Mix flour and salt. Rub in cold butter until it resembles breadcrumbs. Add egg yolk and water to form dough. Wrap and chill 30 minutes.
Cook filling: Cook bacon until crispy, reserve 1 tbsp fat. Add butter to pan and caramelise onions 20-25 minutes until golden. Prepare base: Roll pastry, line tin, prick base. Blind bake at 200°C for 15 minutes with baking beans, then 5 minutes without. Reduce to 180°C. Make custard: Whisk eggs, cream, milk, thyme, salt, pepper, and nutmeg.
Assemble: Layer onions, bacon, and half the Marsh Extra Tasty Cheddar in pastry case. Pour over custard, top with remaining cheese. Bake: Cook 30-35 minutes until set and golden. Rest 10 minutes before serving.