I’m looking for a way to avoid single points of failure when fetching Flake inputs. For example, if a Git forge goes down then have Nix try an alternate mirror. As far as I know this is not possible with a Flake input.
There have already been past (unresolved) discussions on decentralized Nix fetchers and stalled PRs for IPFS and Git remote helpers. Despite all my searching I can’t find any solution to this problem.
I suspect that someone out there has a clever solution for getting Nix to fetch a Git repo from a decentralized source like Radicle, especially when it comes to Flake inputs. What weird hacks have you come up with?
I’ve thought about writing a tool that would scan the flake.lock file, try to find alternate sources for inputs, and then generate --override-input options (or generate an alternate lock file). Before I do anything stupid I was hoping to find out if anyone else has done something in this space.
Yes, that’s absolutely a viable option. However, I don’t want to expose my Forgejo instance to the public internet and don’t want to hide my flake inputs behind a closed mirror. (The last time I ran a public Git forge it was completely unusable due to the load caused from bots.)
That said, perhaps the easiest solution is to open my Forego instance and protect it with an anti-AI/anti-bot front end.