Hi! We’re using Gitlab CI to build software via Nix (via
nix-build, that is) and would like to have the resulting binary in
result/bin/ accessible on the (same or maybe even a different) server.
As I understand it, after the CI is finished building, it will remove the whole work directory, along with the
result symlink, which, in turn, tells Nix to collect the software when
nix-collect-garbage is run.
So I guess what we want is to copy the binary somewhere globally accessible and tell Nix to not garbage collect it. Is this easily possible?
I’d like Nix to garbage collect old versions of the software, of course, and only keep the latest.
Note: we’re not using NixOS, just Nix!