Preheat the oven to 180 degrees C. Lightly grease an ovenproof dish. Finely chop an onion and cook in butter till soft. Add flour and cook for another minute.
Slowly stir in the milk and mustard and keep stirring till the sauce thickens. Remove from heat an add 1 cup of cheese with salt and pepper. Stir in the macaroni.
Place a layer of tomatoes in an oven proof dish and pour the macaroni mixture into the dish.
Sprinkle the rest of the cheddar cheese on top and then place the rest of the tomatoes on top of that. Sprinkle the parmesan over the top and bake for 30 mins.