Ingredients

3 tablespoons unsalted butter

1/2 cup minced yellow onion

1/3 cup all-purpose flour

4 cups whole milk, room temperature

Coarse salt and ground pepper

2 bunches curly- or flat-leaf spinach (about 1 3/4 pounds total), trimmed, washed, and cut crosswise into 1/2-inch-thick strips

5 ounces Gruyere cheese, grated (2 cups)

3/4 pound elbow macaroni, cooked according to package instructions

Preparation

In a large saucepan, melt butter over medium. Add onion and cook until translucent, 6 minutes. Whisk in flour and cook, stirring frequently, until mixture is pale golden and has a slightly nutty aroma, about 2 minutes. Whisking constantly, add 2 cups milk. Add remaining 2 cups milk, raise heat to medium-high, and whisk until smooth; season with salt and pepper. Cook, whisking constantly, until sauce comes to a boil, 8 to 10 minutes. Reduce heat to low and simmer gently, stirring occasionally, until sauce thickens, 13 to 15 minutes.

Add spinach and cook, stirring constantly, until wilted, about 3 minutes. Add cheese and stir until melted, about 2 minutes. Add cooked macaroni and stir to combine. Serve immediately.