Cut the onions in half, then each half into 4 wedges. Heat the butter and oil together in a medium pan, add the onions and sauté over a high heat for 2-3 minutes to soften.
Sprinkle in the thyme, sugar, vinegar and a good pinch of salt, stir, then cover and cook over a low heat for 15-20 minutes, stirring occasionally until the onions are soft. This can be done ahead of time and the onions stored in the fridge for 3 days.
Preheat the oven to 220oC/Fan 200oC/Gas 7. Bring a large pan of salted boiling water to the boil. Add the macaroni and cook for 6-8 minutes, or until the pasta is tender and ‘al dente’. Drain in a colander.
Whilst the pasta cooks, pour the milk into a medium pan, add the butter and flour and bring to the boil, stirring frequently with a balloon whisk until the mixture boils and thickens. Cook for 1 minute stirring until you have a lovely smooth sauce.
Add the mustard, nutmeg and half the cheese and mix well. Stir in the macaroni and gently fold in half the caramelised onions.
Tip the mixture into an ovenproof dish. Scatter over the remaining onions, breadcrumbs and top with the remaining cheese. Place on a baking tray and bake for 25-30 minutes or until golden and bubbling. Serve with a simple green salad