So, I am reimplementing nix-snapshotter, which creates empty container layers with custom nix annotations to avoid any duplication of the Nix store for nix-built images through a containerd snapshotter, for Podman (pdtpartners/nix-snapshotter#103), and I have ran into the following issue:
Additional layer stores are only searched with a TOC annotation
This is annoying, as the way nix-snapshotter works is by replacing the layer diff with a layer that mounts a bunch of nix store stuff.
I have an LLM-generated fix for this that always checks additional layer stores first at https://github.com/bitbloxhub/container-libs/tree/als-first, and that seems to work. There was also an issue where the second run was erroring and thought the image was corrupt due to it being marked as a volatile layer, but that was also fixed, but I don't think that's the right solution?
So, I am reimplementing
nix-snapshotter, which creates empty container layers with custom nix annotations to avoid any duplication of the Nix store for nix-built images through a containerd snapshotter, for Podman (pdtpartners/nix-snapshotter#103), and I have ran into the following issue:This is annoying, as the way
nix-snapshotterworks is by replacing the layer diff with a layer that mounts a bunch of nix store stuff.I have an LLM-generated fix for this that always checks additional layer stores first at https://github.com/bitbloxhub/container-libs/tree/als-first, and that seems to work. There was also an issue where the second run was erroring and thought the image was corrupt due to it being marked as a volatile layer, but that was also fixed, but I don't think that's the right solution?