Preheat the oven to 350°F.
Butter a baking dish.
Brown the chopped onions and minced garlic in some olive oil in a skillet or pan on the stove, using low heat.
Peel, wash, and slice the potatoes either by hand or on a mandoline. Make sure the slices are more or less the same in size.
Mix the potatoes, sautéed onions, garlic, heavy cream, butter, Gruyère cheese, salt, peppers, and nutmeg in a large bowl.
Pour the mixture into the baking dish.
Place it in the preheated oven, and bake for an hour until the top is browned and it’s bubbling.
Enjoy your recipe!