Preheat oven to 400 degrees F (205 degrees C). Grease a 1-quart baking dish with about 1 teaspoon butter.
Melt remaining butter in a saucepan over medium heat. Add flour and 1/2 teaspoon sea salt; whisk constantly for 1 minute. Pour half-and-half into flour mixture, stirring and cooking until mixture has thickened, about 4 minutes.
Layer half the potatoes into the bottom of prepared baking dish. Top with onion slices, rosemary, 1/2 cup Cheddar cheese, and remaining potatoes; season with sea salt and pepper. Sprinkle 1 cup Cheddar cheese and paprika over potatoes. Pour half-and-half mixture over potato mixture; cover with aluminum foil.
Bake in preheated oven until potatoes are tender, about 75 minutes. Remove aluminum foil and continue baking until potatoes are lightly browned, about 15 minutes.