In a small saucepan, put the lentils and vegetable stock. Bring to a boil and let cook for 15 to 20 minutes (the lentils should be cooked but hold their shape).
In the food processor, put the cooked lentils, the onion, the garlic clove, the mushrooms, the macadamina nuts, the breadcrumbs and the dried herbs. Press a few times to chop and mix. Add the egg and season with salt and freshly ground black pepper. Press a few more times to mix.
Preheat the oven to 200º C. Line a baking tray with parchment paper and brush with olive oil.
Take small portions of the lentil mixture and shape them into balls (this amount makes about 12 balls the size of a golf ball). Place them on the lined tray and brush each with olive oil. Bake in the preheated oven for 30 minutes.
While the lentil meatballs are in the oven, make the tomato sauce. In a saucepan, heat the olive oil and sauté the onion and the garlic, until they are translucent. Add the white wine and let evaporate. Add the tomatoes and their juices, bay leaf and thyme and season with salt and freshly ground black pepper. Cover and cook for 20 minutes on low heat.
Cook the spaghetti, or any other pasta that you want to use, according to the instructions on the package. Serve the lentil meatballs with the tomato sauce and the spaghetti.