Preheat oven to 400℉/205℃.
Peel and wash potatoes, then slice into about ⅛" slices. Use a mandolin, if desired, for even and fast prep.
Melt the butter in a large saucepan over medium heat. Add onions, garlic, and thyme. Saute for 1-2 minutes or until fragrant. Be careful not to let the garlic burn.
Whisk in flour until thoroughly combined.
Gently pour in the cream, whole milk, and evaporated milk, followed by salt, pepper, and nutmeg. Bring the cream mixture to a boil and simmer over medium heat, stirring occasionally for about 5 minutes or until the mixture starts to thicken.
Add about ½ cup of shredded cheddar cheese and ½ cup of Gruyere (or Jarlsberg or more cheddar) and stir until smooth. Remove saucepan from the heat.
Grease a 9x13 casserole dish with butter or cooking spray.
Place half of the potatoes in the greased pan, top the potatoes with the sauce, and add the rest of the potatoes and any other remaining sauce.
Cover the dish with foil paper and bake for 45-50 minutes or until potatoes are fork-tender. Take the foil off the dish, sprinkle the remaining cheese over the top, and bake for another 15-20 minutes or until the potatoes are bubbly and brown. Optional: Broil for 5 minutes more for a crustier and browner top.
Top with the thyme sprig, if desired. Serve warm.