Have you considered integrating this functionality with this nix project builder? https://bob.build/
Or this dependency installer that uses nix? https://www.jetpack.io/blog/devbox/
It is amazing to see all this user-friendly tooling come out now that is leveraging nix.