I think you're looking for Nix flakes proper! This is one of the promises!
Given so, this means many tools based on nix provide this too, though it's not as easily surfaced.
Given so, this means many tools based on nix provide this too, though it's not as easily surfaced.