Preheat oven to 350 degrees F. Generously butter a 9-inch-by-13-inch casserole dish.
Heat butter in a medium saucepan over medium heat. Add the garlic and cook, stirring often, until aromatic, about 2 minutes. Add the heavy cream to the pan and cook until the cream mixture comes to a low simmer, about 5 minutes. Remove from the heat and set aside.
Remove the green part from the leek and slice in half. Run each half under cold water to clean out any dirt or sand. Pat dry and thinly slice.
Place a layer of the potato slices in the bottom of the prepared casserole dish. Pour a thin layer of the cream mixture over the top. Sprinkle with kosher salt and black pepper. Top with a 1/3 of the sliced leeks, approximately 2 teaspoons chopped thyme, and 1/4 cup of Parmesan cheese. Repeat until all of the potatoes are used up. Top final layer with remaining cream.
Cover the pan with aluminum foil and bake for 1 hour. Remove the pan from the oven and evenly sprinkle the walnut streusel over the potatoes. Bake, uncovered, for 30 minutes, or until the potatoes are tender and the streusel is golden brown. Remove the potatoes from the oven and allow them to rest for 15 minutes before serving.
To make the walnut streusel, add walnuts, bread crumbs, thyme, and melted butter to the bowl. Mix to evenly coat. Fold in the Parmesan cheese and set aside.