Deploy-rs: Is there any way to prevent the output generated by deploy-rs being garbage collected?

Inspired by Preventing flake.nix written for remote targets from being garbage collected, I found the solution is to create a GC root.

  1. deploy-rs provides such an option - --keep-result. Yeah!
  2. enable following options in nix.conf:
keep-outputs = true
keep-derivations = true

Then, the essential output will be always placed in /nix/store, even after a garbage collection. :slight_smile: