In a large saucepan, melt the butter over medium heat. Whisk in the flour and cook for 1 minute. Whisk in about 1/2 cup milk and cook, whisking, until thickened. Add another 1/2 cup milk and cook, whisking, until thickened, about 3 minutes. Add the remaining 1/2 cup milk and cook, whisking, until thickened, another 3 to 4 minutes. Add the nutmeg, 1/2 teaspoon salt, a few turns of black pepper, and half the cheese. Cook gently for a few minutes, making sure all the cheese is melted.
Grease or butter an 8-inch square baking dish. Arrange half of the potatoes all over the bottom. Sprinkle with 1/4 teaspoon salt. Layer in half of the cream mixture, then sprinkle on the ham and half of the chives. Arrange the other half of the potatoes on top, then sprinkle with the remaining 1/4 teaspoon salt, remaining cream, remaining shredded cheese and remaining chives. Cover and bake for 45 minutes, then uncover and bake until browned on top, an additional 20 minutes. Let cool slightly, then serve.