This makes a great side dish or hearty main course with wilted winter greens.
Preheat oven to 350°F. On the stovetop over medium heat, sauté bacon until lightly crisp. Remove bacon with a slotted spoon; save rendered grease in pan. Brush some grease on bottom and sides of a 9x13-inch glass baking dish.
Arrange one layer of sliced potatoes over bottom of baking dish. Scatter a handful of sliced onions. Sprinkle with ½ teaspoon salt and pepper to taste.
Drizzle 1 teaspoon bacon grease over onions; then sprinkle a handful of chopped bacon on top. Sprinkle 1 tablespoon flour over layer.
Add another layer of potatoes and onions; repeat seasoning, bacon grease, bacon, and flour. Add one final layer of potatoes; sprinkle remaining salt and pepper.
Pour cream and stock over potatoes to just cover the top layer. Sprinkle with cheese. Bake until potatoes are tender, about 1 hour.