Put a large pan of water on to the boil for the pasta. Meanwhile, put the oil and nuts in a small pan and warm over a low heat.
Crush the garlic into the pan and sprinkle in the chili flakes if using. Continue warming until the nuts are lightly toasted, checking to make sure the garlic doesn't burn.
Finely grate the zest from both lemons then cut one in half and squeeze out the juice.
Once the pasta water is boiling, add a generous amount of salt and the spaghetti and cook, according to packet instructions.
Drain the spaghetti and tip into a serving bowl.
Pour over the garlicky oil and toss well with the lemon zest and juice, parsley, olives, parmesan and plenty of salt and pepper.
Add more lemon juice to taste - it should be fresh but not overly lemony. Serve with extra parmesan.