I wasn’t sure how to describe my problem in the title.
I want to run one of my Rust application on a NixOS server.
I did:
crate2nix generate
nix-build Cargo.nix
nix copy --to ssh://nixos ./result
Now I can use it in a systemd unit but it will will be garbage collected the next time I run nix-collect-garbage
.
systemd.services.my-thing = rec {
startAt = "01:00:00";
script = "/nix/store/00000000000000000000000000000000-rust_my-thing-0.1.0/bin/my-thing";
};
Any better way?