Preheat the oven to 325F.
In a medium mixing bowl, whisk together the almond flour, coconut flour, garlic powder, and salt. Stir in the melted butter until the contents resemble wet sand.
Pour the loose dough into a 9 inch pie pan. Spread the sough evenly along the bottom of the pan and push firmly into the bottom and up the sides.
*Please note- depending on how deep your pie pan, you may need to make two pies to use all of the filling. In this case, simply use 9 eggs instead of 6*
Prick around the bottom of the pan with a fork. Bake 10-12 minutes or until slightly puffed and just starting to brown. While it cooks, finish making the filling.
In a large skillet over medium-high heat, melt the butter. Add the onions and sprinkle with the salt and pepper. Cook, stirring frequently until the onions have softened. If the onions become crunchy, you have cooked them too long! This can take as long as 20 minutes.
Add in the diced ham for a couple of minutes to let them warm.
Grate your Gruyere cheese and sprinkle a light layer over the bottom of the pie pan. Cover with the caramelized onions and ham.
In a large mixing bowl, combine the eggs, heavy cream, sat and pepper. Whisk together and pour over the onions, ham and cheese in the pie pan. Sprinkle the top with gruyere cheese.
Bake 35-40 minutes or until the filling is set in the center.
Enjoy!