In a large bowl add your flour and salt. Add your butter and use your hands to rub it into the flour. Continue until the butter is all incorporated and about the size of a pea, but it's okay if there are some larger chunks. Next add your water, starting with 75g. Use a fork to combine. Add the remaining water until the dough comes together.
Transfer the dough to a lightly dusted surface. Knead until no dry spots remain. Do not overwork (this isn't bread).
Shape into a disc and wrap in plastic wrap.
Chill for at least 1-2 hours.
Make your filling
Preheat oven to 400 °F
Line a baking sheet with parchment paper.
Cut your onions and leek. For the onions, I like to cut them in half (length wise) and then slice them. For the leek, I don't cut it in half before slicing.
To a large frying pan, over medium high heat, add 2 Tbsp butter. Wait until it melts, then add your onions. Stir to combine the onions and the butter, and then spread them out in the pan to allow them to cook evenly.
Allow them to cook for 20-25 minutes, stirring occasionally. If your burner is really hot, you might need to lower the heat to prevent the onions from burning. If you notice they're sticking to the bottom of the pan, you can add a little more butter.
Add another 1 Tbsp butter and your sliced leek to the onions. Stir to combine, and then let cook for 10-15 minutes, stirring occasionally.
Add thyme, rosemary and a pinch of salt. Stir to combine and cook for another 5 minutes or so.
Add the lentils, and stir combine. Taste and add more herbs or salt if you think it needs it. Remove from heat and set aside.
Make your galette
Remove your dough from the fridge and let sit for 5-10 minutes before rolling it out.
Remove from the plastic wrap and move onto a lightly floured surface. Roll into a large circle about 1/8" thick and gently transfer to your parchment paper-lined baking sheet.
Transfer all your filling onto the dough. Spread it out leaving 1-2 inches of dough for the crust.
Fold the crust over some of the filling, and brush with your egg.
Sprinkle about 1/4 cup of your gruyere cheese over the filling.
Bake for 25-30 minutes or until golden brown.
Remove from the oven, and sprinkle with the remaining cheese.
Let sit 5 or so minutes, then slice and serve! Garnish with balsamic drizzle if you have it.