Description
Hercules CI matrix room:
@srid:
I thought of a cool feature. "Pin" the most recent successful HCI job, so that the automatic GC will garbage collect all but derivations built by those jobs.
Why would this be cool? Let's say I have been using HCI for https://github.com/srid/neuron - and neuron is now in maintenance mode. It receives no commits lately. But I still want people to make use my of Nix cache. If I run Nix's usual GC service to have it delete, say, everything older than 30d (mainly done to not run out of disk space left), it will surely delete all neuron derivations. Instead, with this HCI pinning feature, the build for the latest master branch commit will remain the Nix store because HCI pinned it.
This will allow me to use nix-serve-ng and the like to provide a cache server, without thinking about pushing to s3 or cachix (where you still have to worry about disk usage growth).
I call this "intelligent GC"
@roberth:
I was going to call it smart gc :D
My idea was to keep a list of roots, and more of a cache than a more "obligatory" archive, but what you're suggesting is much easier to implement