Preheat oven to 350 degrees F. In a large skillet cook bacon over medium heat until crisp. Transfer to a paper towel-lined plate; crumble into pieces. Drain all but 1 tablespoon bacon drippings in skillet. Add the apples and onion. Cook until tender, about 5 minutes; set aside.
Cook pasta according to package directions; drain and set aside. Meanwhile, in a large saucepan melt butter over medium heat. Stir in flour and ground black pepper until combined. Add milk all at once. Cook and stir until slightly thickened and bubbly. Add mustard and both cheeses, stirring until melted. Stir pasta, apples and half of the bacon into cheese sauce, stirring to coat. Transfer to a 2-quart square baking dish. Bake, uncovered, for 25 to 30 minutes. Sprinkle with remaining bacon and fresh thyme, if desired.