Unless you’re replacing existing dependencies of existing packages, you don’t really an overlay for this, and they do come with a somewhat heavy computational cost. Right now you’re just using the overlay to put values in pkgs and immediately extracting them again. There’s no actual need for pkgs to be involved in transporting them around.
That said, the most straightforward conversion of what you have is to make one flake which has the overlay as an output, then use that flake as an input to another flake with a devShell output. You reference the overlay through the flake input instead of using a fetchtarball.
a/flake.nix:
{
outputs = { self, ... }: {
overlay = self: super: { ... };
};
}
b/flake.nix:
{
inputs.a.url = ...;
inputs.nixpkgs.url = ...;
outputs = { self, nixpkgs, a, ... }: {
devShells.x86_64-linux.default = let
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ a.overlay ];
};
in pkgs.mkShell { ... };
};