Preheat oven to 350F.
To prepare the meat filling, heat 2 tablespoons of olive oil in a large skillet over medium-high heat. Add the onions, sugar and thyme. Saute for about 3 minutes, until the onions are nicely caramelized. Add the garlic and saute for another 30 seconds. Mix in the tomato paste and saute for another 2 minutes until it becomes fragrant. Add another 2 tablespoons of olive oil and the ground beef, mix well and cook for about 4-5 minutes. Slowly pour in the wine and cook until it mostly evaporates. Add the tomatoes, cinnamon, bouillon cubes and bay leaves. Turn the heat down to low and simmer for 10-20 minutes, until the sauce has thickened and the meat has cooked through. Remove from heat, discard bay leaves and set aside to cool.
To prepare the bechamel sauce, heat the butter in a pot over medium heat. Add the flour as soon as the butter melts. Using a whisk, beat vigorously until the flour and the butter are well mixed. Saute for 3-5 minutes, mixing and scraping from the sides to prevent burning, until the flour turns brown and has a nutty aroma. Add the milk in small batches, whisking continuously so that no lumps form in the mixture until the bechamel sauce become smooth and creamy. Continue cooking, whisking continuously, until the sauce thickens. Remove from heat and add salt, pepper, nutmeg and the Gruyere cheese, saving 3-4 tablespoons for garnish. Add the 3 egg yolks and whisk till incorporated. Set aside.
To prepare the pasta, boil the ziti or bucatini in salted water for about 1-2 minutes less than instructed on the package. The pasta needs to be al dente otherwise it will overcook during baking. Drain the pasta and set aside.
Assembly and baking. Brush a baking pan with olive oil. Spread the pasta evenly. Add the eggs, thyme, parsley and crumbled feta cheese and mix thoroughly by hand. Add a cup of bechamel sauce to the meat filling and mix well. Spread the meat filling evenly over the pasta. Next, spread the remaining bechamel sauce evenly over the ground meat. Sprinkle the reserved grated Gruyere cheese (plus more if you desire) on top. Bake for 40 minutes at 350F with convection or until the bechamel turns golden brown. Let rest for 5-10 minutes, slice and serve, sprinkled with some olive oil and fresh thyme leaves.