Created by ForeverMama on November 28, 2021
Step 1: Heat oil in a large skillet over medium heat. Add onions and season with salt and pepper. Cook, stirring occasionally, until golden brown, 30 to 40 minutes.
Step 2: Preheat oven to 350°F. Lightly grease a 3-quart baking dish. Combine onions, cream, garlic, thyme, rosemary, 1 2/3 cups Gruyère, and 2/3 cup Parmesan in a bowl. Season with salt and pepper.
Step 3: Arrange potato slices vertically in prepared baking dish. Pour cream mixture over potatoes, making sure some of the mixture goes between the potatoes. Cover with aluminum foil.
Step 4: Bake until potatoes start to soften, 50 to 60 minutes. Remove foil and bake until potatoes are golden brown, 25 to 30 minutes. Sprinkle with remaining 1/3 cup Gruyère and 1/3 cup Parmesan. Bake until cheese is golden brown and bubbling, 5 to 10 minutes.