Heat the oven to 220°C (fan).
Halve the onions and slice them thinly into half moons. Cube the aubergine. Rub the aubergine with salt and combine with onions.
Place them in the bottom of your tagine or ceramic baking pot. Drizzle generously with olive oil. Roast uncovered for 30 minutes, until soft, browned and slightly crispy.
Remove from oven and immediately stir in baharat, turmeric, garlic powder, and a pinch of chilli flakes (if using), while the oil is hot.
Add the drained lentils, rinsed rice, and hot vegetable stock. Stir gently to combine. Cover tightly with the lid and return to the oven for 30 minutes, until the liquid is absorbed.
Let the pot rest for 5 minutes, then dot with butter, cover again and leave for another 5 minutes.
Uncover, scatter with flaked almonds, and fluff the rice with a fork to lift and separate the grains. Serve with lemon wedges and topping of choice.
Optional toppings: Za’atar for garnish or plain yoghurt as a side.