01 - Preheat oven to 375°F. Grease a 9x13-inch baking dish.
02 - Melt butter in a medium saucepan over medium heat. Add chopped onions and cook until softened, about 3 to 4 minutes.
03 - Stir in flour and cook, stirring constantly, for 1 minute.
04 - Gradually whisk in milk and heavy cream. Bring to a simmer, then add salt, pepper, garlic powder, and nutmeg. Cook until thickened, 3 to 4 minutes.
05 - Remove from heat and stir in 1.5 cups shredded cheddar cheese until melted and smooth.
06 - Arrange half the sliced potatoes evenly in the baking dish. Pour half of the cheese sauce over the potatoes.
07 - Layer the remaining potatoes and pour the remaining cheese sauce on top.
08 - Sprinkle the remaining 0.5 cup cheddar cheese and Parmesan cheese over the top.
09 - Cover with aluminum foil and bake for 40 minutes.
10 - Remove foil and bake an additional 20 minutes until golden and bubbling.
11 - Allow to rest for 10 minutes before garnishing with chopped chives or parsley and serving.