Boil the spaghetti in boiling water for 5 minutes, add the broccoli and cook for another 5 minutes.
In the meantime, heat half of the oil and sauté the onion and garlic. Add walnuts, breadcrumbs, chilli flakes, walnut oil, and stir-fry until the crumbs are crispy and golden brown.
Drain the pasta and broccoli, return them to the saucepan and mix in the remaining olive oil. Arrange the spaghetti on plates and spread the nut mixture over them.