01 - Preheat oven to 375°F. Grease a 9x13-inch baking dish with butter.
02 - Melt the butter in a medium saucepan over medium heat. Add the chopped onion and sauté until soft, about 3 minutes.
03 - Sprinkle the flour over the butter and onion, whisking constantly for 1-2 minutes until bubbling but not browned.
04 - Gradually whisk in the milk and cream until smooth. Bring to a simmer and cook until slightly thickened, 3-4 minutes.
05 - Remove from heat. Stir in 1½ cups cheddar cheese and all the Parmesan until melted and smooth. Season with salt, pepper, and nutmeg.
06 - Arrange half of the potato slices in the prepared baking dish, overlapping slightly. Pour half of the cheese sauce over the potatoes. Repeat with remaining potatoes and sauce.
07 - Sprinkle the remaining ½ cup cheddar cheese evenly over the top layer.
08 - Cover the dish with foil and bake for 40 minutes.
09 - Remove the foil and bake for an additional 20 minutes, or until potatoes are tender and the top is golden brown and bubbly.
10 - Let the dish stand for 10 minutes to set before serving.