Optimizing the configuration of a microgrid allows to reduce energy losses and costs. Due to the new demand profile that emerged with the covid-19 pandemic with remote work, it is important to study its impact on the dimensioning of a microgrid, as well as the way in which renewable resources are distributed and dimensioned, in order to promote its use. Thus, this paper aims to propose the optimal configuration of distributed energy resources that meet two scenarios, pre-pandemic and post-pandemic, of electricity demand in a household in Salvador, Brazil. Therefore, an optimization problem was formulated in GAMS using environmental data and electricity demand, as well as the costs involved in the implementation and operation of the system, considering the resources of solar, wind and biogas energy. There was a change in the post-pandemic scenario, with the tendency to increase the use of solar energy, due to the demand being distributed throughout the day. It was observed for both scenarios that biogas energy had the greatest participation in domestic energy generation, followed by solar and wind energy. Therefore, the use of biogas in combination with other renewable resources can minimize costs and, at the same time, meeting the energy demand of a residence. In addition, this contributes to the environmental and economic sustainability of the region, as consumers begin to produce their own energy using renewable resources.