Bring a large pot of water up to a boil over high heat to cook the pasta. Once the water boils, salt it and cook the pasta to al dente. Right before draining the pasta, remove and reserve 1 cup of the pasta cooking water.
Place a large skillet over medium-high heat, add the chopped walnuts and toast them, stirring every now and then, until they are golden and smell toasty -- a couple of minutes. Remove nuts from the skillet and reserve.
Once the pasta is close to being done, return the same skillet you cooked the walnuts in to the stove top over medium-high heat with 3 turns of the pan of EVOO, about 3 tablespoons. Once the EVOO is hot, add ham and cook for 2-3 minutes or until it starts to lightly brown.
Add the garlic and red pepper flakes, cook it for another minute. Add the reserved pasta cooking liquid and cook until liquid has reduced by half. Add the pasta, toasted walnuts, lemon juice and parsley, toss it to coat the noodles and continue to cook until the pasta has soaked up almost all of the liquid. Turn heat off, add the butter and grated cheese, and toss until the butter has melted. Serve with extra Parmigiano at the table.