[nixpkgs the package collection] (which is used by [Nix the package manager], and also contains the [Nix the programming language] expressions that define [NixOS the operating system]) has expressions for easily building OCI images: https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-dockerTool...
Do you have to be on NixOS to use the OCI images outputtable by nixpks/nix package manager or can you build OCI images using Nix from Mac/Windows/other non NixOS Linux?