Best Way to Setup Local Mirror of Qubes/Fedora/Debian Repos

Hey, I’m doing a lot of reinstalling stuff setting up my provisioning script and I think it would be pretty helpful to be able to host a local mirror of everything locally. Can anyone recommend an approach?

I know Sonatype Nexus allows you to have a passthrough cache (i.e. you can configure your yum/apt-get sources as https://localhost:38855/sonatype/yum and it will proxy and cache assets) but ideally, I’d like to also be able to have a static mirror locally as well. Have any of you tried this or have any ideas? I have a 16TB hard drive laying around that I’d like to put to good use. I’m actually pretty surprised this isn’t more of a thing to do since huge hard drives are pretty cheap these days.

If anyone has any technical knowledge, I would appreciate it. My plan is to integrate it with GitHub - tuna/tunasync: Mirror job management tool..

If you install apt-cacher-ng then you can use it as a caching proxy for
Templates, (over qrexec), as a drop in replacement for tinyproxy, and
for qubes, by having it as upstream netvm.
There’s a packaged solution installable from qubes-task -
https://qubes.3isec.org/tasks.html. There’s also a note at GitHub - unman/notes

If you are looking for actual mirroring, you can use apt-cacher-ng for
this too, (at least for Debian based distros - I haven’t tested anything
else).
You specify the branch, arch and source tree, and apt-cacher-ng will
preload all available files. That makes a partial mirror of just what
you want you can use offline. It’s in the manual