01 - Preheat oven to 375°F. Grease a 9x13-inch baking dish with butter.
02 - In a medium saucepan, melt the butter 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 the mixture is bubbling but not browned.
04 - Gradually add the milk and cream, whisking 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 - Layer 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 on top.
08 - Cover the dish with foil and bake for 40 minutes.
09 - Remove the foil and bake for an additional 20 minutes, or until the potatoes are tender and the top is golden brown and bubbly.
10 - Let stand for 10 minutes before serving.