For the pesto, add the pistachios and cheese to a food processor. Pulse to break them into small pieces and add enough olive oil to slacken the mixture to your desired consistency (you may not need all the oil). Add all the herbs, the chilli (if using) and lemon juice. Pulse again to combine the herbs and add a little more olive oil. Season generously with sea salt and give the mixture one last pulse. Taste the pesto, to make sure it has enough salt and acidity, and allow it to rest in the fridge until you need it.