In a large pot, bring water, 3 cups of wine, and a large pinch of salt to a boil. Add spaghetti, cook until al dente, stirring occasionally. Drain, reserving 1/4 cup of the cooking liquid.
In a large skillet, heat 2 tablespoons olive oil over medium-high heat. Add the garlic and red pepper, and season with salt. Sauté for 1 to 2 minutes. Add the remaining 1/4 cup of wine and the reserved cooking liquid and bring to a simmer.
Stir in pasta, cook until the liquid is nearly absorbed, about 2 minutes. Add parsley, nuts, cheese, and the remaining 2 tablespoons of olive oil, toss to coat. Season pasta with salt and pepper. Serve immediately, passing grated cheese at the table.