Preheat oven to 350°F. In a bowl, combine coarse semolina, sugar, plain yogurt, melted butter, and baking powder until smooth. Fold in coconut flakes if using. If the batter is too stiff, add a splash of milk to achieve a thick but pourable consistency.
Grease a 9x9-inch pan and pour the batter in. Smooth the top. Use a sharp knife to score diagonal lines forming diamond or square shapes. Press one whole almond or pine nut into the center of each piece.
Bake on the center rack for 30-40 minutes until the top is golden brown and edges slightly pull away from the pan. A toothpick inserted should come out clean.
While the cake bakes, prepare the syrup: Combine sugar, water, and lemon juice in a small saucepan and bring to a boil. Simmer for 8-10 minutes until slightly thickened. Remove from heat and stir in rose water or orange blossom water. Let syrup cool to warm temperature.
Remove the baked cake from the oven and immediately pour the warm syrup evenly over the surface. The cake should sizzle and soak in the syrup. Let rest for 20-30 minutes to fully absorb the syrup and set the texture before serving.