Peel onion and garlic and chop finely. Peel and core the pumpkin and cut into cubes.
Chop the walnuts, toast them in a pan without oil and set aside.
Heat the oil in a pan and fry the onions and garlic until translucent. Add the pumpkin, sauté for 2 minutes and deglaze with the stock. Season with salt, pepper and nutmeg and cook for about 15 minutes.
Cook the pasta according to the instructions on the packet.
Add the sour cream to the pumpkin and finely mash everything. Drain the pasta and mix in. Divide the pasta on 4 plates and sprinkle with walnuts and parmesan.