Toast the almonds and walnuts in a preheated oven at 180°C/350°F for 5-10 minutes or until they look lightly toasted. You can also toast them in a pan over medium heat but it's less even. Let them cool down 100% before making the pesto because the smallest amount of heat makes the leaves go black.
Place all the ingredients in a food processor or use an immersion blender instead. Process the ingredients until the pesto forms. Don't overdo it because, with friction, leaves also turn black. Add more olive oil if needed for the desired consistency.
To use in pasta, add it to a pan with the cooked pasta and ¼ cup of pasta water. Mix to combine and heat up. Add more water if necessary and serve with parmesan cheese.