Energy, water, and waste systems analyzed at a nexus level are important to move toward more sustainable cities. In this paper, the "resilience.io" platform is developed and applied to emphasize on waste-to-energy pathways, along with the water and energy sectors, aiming to develop waste treatment capacity and energy recovery with the lowest economic and environmental cost. Three categories of waste including wastewater (WW), municipal solid waste (MSW), and agriculture waste are tested as the feedstock for thermochemical treatment via incineration, gasification, or pyrolysis for combined heat and power generation, or biological treatment such as anaerobic digestion (AD) and aerobic treatment. A case study is presented for Ghana in sub-Saharan Africa, considering a combination of waste treatment technologies and infrastructure, depending on local characteristics for supply and demand. The results indicate that the biogas generated from waste treatment turns out to be a promising renewable energy source in the analyzed region, while more distributed energy resources can be integrated. A series of scenarios including the business-as-usual, base case, naturally constrained, policy interventions, and environmental and climate change impacts demonstrate how simulation with optimization models can provide new insights in the design of sustainable value chains, with particular emphasis on whole-system analysis and integration.