The residential sector contributes significantly to primary energy consumption. Energy efficiency measures in this sector consequently play a key role in the transformation towards a more sustainable energy system. There are a multitude of options available to increase the energy efficiency, e.g. the installation of various electricity and heat supply systems or retrofitting of the building stock. Due to the availability of all these options, the investment planning decision for residential energy supply systems is very complex and requires the support of mathematical optimization methods. However, existing works in this field often use simplifications with regard to the considered portfolio of measures or the considered time resolution in order to maintain computational feasibility. These simplifications lead to sub-optimal or incomplete decisions for residential energy system investments. In this paper, a novel optimization model for the integrated investment and operation planning decision for residential energy supply systems is presented. Instead of using simplifications, the presented model uses a dual dynamic programming approach to reduce computational complexity. Due to this efficient solution strategy, additional decision variables can be integrated into the optimization without meeting computational limits. The functionality and mathematical structure of the decomposition approach are presented and compared to a general mixed-integer linear programming model. An exemplary case study is conducted for both a single family and an apartment building.