I have packaged a Rust application using nix flakes and would like to deploy it to another server that has nix installed.
I have successfully created a binary cache from that application by executing
nix flake archive --to file:///tmp/nix-binary-cache ./my-flake-directory
per the nix 2.4 alpha / 3 guide: nix flake archive
Based on the manual’s wording, I thought
nix flake archive ./data/nix-binary-cache/ would work. But that errored because the binary cache is not a flake.
I am stuck on how to consume this from another nix store. Without trying any more complex build tools, what nix command should I use to consume this?
Should I even use a binary cache?
I have considered simply copying the flake to the server and simply doing
nix run. But I would like to have the project compiled in advance and not on the destination server.
This is a kind of feedback to the Nix 2.4 RC.