Nixifest: Generate Kubernetes manifests from Nix

container-libs has support for “additional layer stores” for lazy pulling (e.g. Stargz), but it requires a TOC digest, but this is too limited for supporting nix-snapshotter images (which is the goal of nix-storage-plugin). But I work around this by patching it to check more than just the TOC digest, it will check against the compressed-digest and diff-digest, which are different because nix-snapshotter makes an mostly empty tar with only the list of Nix store paths prefixed with /nix/store.
Then you build Podman/CRI-O against the patched container-libs, and configure NSP as an ALS and registry aliases for nix:0/nix/store image resolution.

See this issue:

Also “plugin” is a bit of a misnomer as there’s no real concept of a “plugin”, it’s essentially just a FUSE ALS and a container registry for resolving nix:0/nix/store/ images, I just called it that because other names would have been much longer or too unclear.

1 Like