Dice the onions and ham and sauté in butter. Then add the flour and let it brown while stirring. Deglaze with cream and milk and bring to the boil. Remove from the fire and add the egg yolks while stirring. Season with parmesan, parsley, pepper and nutmeg.
Put the uncooked pasta in the baking dish and sprinkle with cheese (I use Gouda or Emmentaler). Place in the oven at 200 ° C for approx. 30 minutes.