Heat a large sauce pan over medium heat, add in the olive oil and heat it up.
Add in the diced onions and heat them up for a few minutes, or until they are translucent.
Add the cubed ham, and cook it until the pieces are crispy.
Stir in 1 cup of the basil pesto.
Slowly pour in 1/3 cup of the heavy cream, while you're stirring it into the sauce.
Lower the temperature and let the sauce simmer.
Bring a large pot of water to boil.
Add in the pasta noodles, and 1 TBS of salt, and cook the pasta noodles according to the package directions.
Drain the water from the pot, and add the pasta back to the pot.
Pour the pesto sauce into the noodles, and stir it all together.
Add up to 1/2 more cup of pesto, and another 3 TBS of heavy cream, if needed to coat the pasta liberally in the sauce.
Sprinkle in chili powder, to taste, if desired.
Stir in ¼ cup chopped walnuts, if desired.
Serve with fresh grated Parmesan, if desired.