There are lots article that compare flakes to cargo/rust, but I think yocto is a better comparison. In yocto groups of packages are composed with other groups of packages using layers. Similar new machines/platforms are also supported by new layers
Would I be right in say the way to compose groups of packages in nix is with overlays?
yocto recipe → nix package
yocto layer → nix overlay
yocto class (python cmake) → std environment functions