Peel the onions and finely slice. Heat the butter in a large sauce pot and fry the onions until soft. Pour in the vegetable broth and the wine and season with nutmeg, thyme and ground caraway.
Bring to a boil, then simmer for 25 - 30 minutes.
Toast the slices of baguette and rub a peeled garlic clove over the top of the baguette, then use a garlic press to crush the rest of the garlic into the soup.
Season the soup with salt and pepper and spoon into 4 ovenproof bowls. Arrange the baguette slices on top of the soup, sprinkle grated cheese over the top and place for a few minutes under a broiler until the cheese has melted.
Sprinkle with freshly ground black pepper and serve.