Wash the potatoes thoroughly and cook in plenty of boiling water for about 20 minutes. In the meantime, clean the spinach, wash it thoroughly several times and let it drain. Peel onions and garlic. Finely dice the onions, press the garlic through a garlic press
Heat 30 g fat in a pot, fry 2/3 of the onion cubes and garlic in it. Add spinach in two or three portions and cook covered until it has collapsed. Season with salt, pepper and nutmeg and simmer for 2-3 minutes. Drain potatoes, rinse with cold water and drain. Peel the potatoes, let them cool down a little if necessary and cut them into slices.
Heat 60 g fat, fry the remaining onion cubes until translucent. Add flour and sauté briefly. Add stock and 450 ml milk while stirring and bring to the boil. Let the sauce simmer for about 5 minutes. Add half of the cheese and melt in it. Season sauce with salt, pepper and nutmeg to taste. Mix the egg yolks and 5 tablespoons of milk and stir into the hot sauce. Do not let it boil any more! Grease a large casserole dish and spread a thin layer of sauce on the bottom of the dish. Put 1/3 of the potatoes into the baking dish and half of the spinach on top.
Season sauce with salt, pepper and nutmeg to taste. Mix the egg yolks and 5 tablespoons of milk and stir into the hot sauce. Do not let it boil any more! Grease a large casserole dish and spread a thin layer of sauce on the bottom of the dish. Put 1/3 of the potatoes into the baking dish and half of the spinach on top. Layer the rest in the same way and finish with sauce. Sprinkle with remaining cheese and pine nuts and bake in the preheated oven, 2nd shelf from below (electric oven: 200 °C/ convection oven: 175 °C/ gas: level 3) for approx. 45 minutes until golden brown