For the onion mixture: Place the bacon in a heavy skillet, add the onions, and saut over low heat until the onions are soft and golden. Add the thyme, salt, and brown sugar. Mix well and continue cooking for a few minutes. Drain off any excess fat, and then pour the mixture into the pie shell.
For the flour mixture: Sift the flour into a mixing bowl; add the beaten eggs, milk, salt and nutmeg. Whisk all the ingredients together and pour the mixture over the onion mixture in the pie shell. Top with the grated Parmesan cheese and bake at 375 degrees for 25 to 30 minutes until golden brown and the pie is firm. Cut into wedges and serve warm.
Makes 4 to 6 servings