For the pesto, put all ingredients in a blender or a food processor until finely chopped and well combined.
Layer the sliced tomatoes, cucumber and lettuce in a large dish, season with black pepper and salt. Sprinkle chopped red onion and walnuts over the salad.