largest closures should get their own layers first
After trying to get very clever with the layer creation I realized that nix2container can do this much better on it's own. I found by just setting the maxLayers to a very large value I could basically get a 1:1 drv:layer. However, for large images this isn't always desirable. For one image in particular this resulted in an OCI image with 542 layers, which podman didn't like very much and refused to launch (at least with the overlay driver).
It would be pretty nice if the automatic layer creation function could somehow sort the derivation closures in order of largest to smallest so that when setting a maxLayers of say, 25, that the 24 larget derivation closures get their own layer and the 25th layer is a collection of everything that's left.
Hopefully this wouldn't add undue complexity.