Allow me to try and describe to you the magnitude of this question
The crux science here isn't necessarily genetic engineering, it's ecological engineering with a comprehensive understanding of microbiology. To create a self sustaining environment as you describe is in reality synonymous with creating a self contained ecosystem. These are very hard to create (I've been looking into them a lot lately with the curiosity of koi fish).
There are several reasons why engineering such ecosystems are incredibly hard.
Diversity - One of the reasons we (humans) haven't killed ourselves off yet is because we live in a global ecosystem that has overcome an Eon of ecological disasters. When something goes wrong somewhere organisms can rapidly emerge to balance out that imbalance. Like the oil spill in the Gulf of Mexico that was thought to wipe out all life in the ocean barely caused a blip. That is because extremophiles exploded into the imbalance and took care of it. Engineered ecosystems lack the diversity to handle imbalances (this is mostly due to our rather limited knowledge of the microbial world). So when one species for one reason or another dies then all the other organisms in the engineered system die as well.
Decomposition - This is related to the above which is the main fact but this warranted a distinction. To exist in a closed ecosystem that is self sustaining, every waste item must be decomposable back into a nutrient structure that your flora can absorb. This is actually a very complicated process. In koi ponds there are things called live filters which contain two or three species capable of decomposing fish waste into nitrates and phosphates which plants love. However, these aren't designed to handle dead fish. This is the problem when making a self sustaining ecosystem. You need to be able to decompose ALL the parts of the members in that ecosystem.
So in a self sustaining human ecosystem you need to be able to break down human bodies, bone included. This also includes plant matter not consumed by humans, like leaves and branches. This brings us to the problem with decomposition. The very organisms adapted to decomposing a dead organism also tend to adapt well to decomposing living species of that organism. This one of MANY reasons why human infections are becoming more prevalent and adept. This is also an entry point into modern waste management processes and advancement.
What you are asking is not impossible, it is just not fully researched yet. The question isn't what could be grown to be self sustaining. The question is what do you need in order to support the members of your ecosystem. We humans can survive off a wide variety of diets, but which members do you want and how do you support them is the real challenge.