Recv failure: Connection reset by peer error

I have created this post on reddit related to the same issue. When large files are downloaded using curl in Nix, it fails due to curl: (56) Recv failure: Connection reset by peer error and now I’m facing it when installing tensorflowWithCuda . Cuda is around 4G and installation fails while downloading the source.

I have fixed the previous by previous issue replacing curl with axel as shown here

https://github.com/s1n7ax/nix-flakes/blob/0996d856a9d8f23b3c5b437e295c3ee5962b7d91/davinci-resolve/davinci-resolve.nix?plain=1#L114-L123

However, it’s not fun to manage my own flakes just to install the same thing nixpkg does. So I’m just wondering if there are any solutions for this?