Cut the unpeeled potatoes into 1½ cm cubes. Put them in an ovenproof dish and drizzle with olive oil. Season with salt and pepper and cook the potatoes in the oven for 20 to 30 minutes.
Meanwhile, melt the butter and add the flour a little at a time, stirring constantly. Add the milk gradually and bring to the boil. Keep stirring until the sauce has thickened. Stir in the cheese and season with nutmeg, salt, and pepper.
Cook the leeks for 20 minutes in a little water in a saucepan with a lid. Drain them and put them on top of the potatoes in the ovenproof dish.
Cut the ham into 5 mm cubes. Spread the ham cubes over the dish and finish off with the cheese sauce.
Grill the leek dish for a few minutes until there is a crispy crust.