Heat the oil over medium heat in a large skillet. Add the onions and a pinch of salt and cook, stirring, until soft and translucent, 5 to 7 minutes. Add the garlic, cumin, harissa, smoked paprika, red pepper flakes, another good pinch of salt and a few turns of black pepper. Cook until it's all fragrant, another 2 minutes. Stir in the tomato paste, followed by the tomatoes and sugar, and simmer until slightly thickened, 10 minutes more. Taste the sauce and adjust the seasonings.