[Nix-dev] Easiest way to deploy a nix-built application with Charon?

Shea Levy shea at shealevy.com
Mon Feb 11 17:51:20 CET 2013


Hi Luke,

If your application is something that should go into $PATH, you should 
put it into enviroment.systemPackages, e.g. environment.systemPackages = 
[ (import /path/to/my/package.nix) ]; On the other hand, if it's 
something that only needs to be run by a systemd unit, you'll need to 
write your own unit, e.g

systemd.services."my-service" = {
   # systemd unit information here...
   serviceConfig.ExecStart = "${import 
/path/to/my/package.nix}/bin/command arg1 arg2";
};

I can help in more detail if you can describe your specific application 
and how it's deployed.

Thanks,
Shea

On 02/11/2013 09:58 AM, Luke Vanderhart wrote:
> Hi,
>
> I have a very simple question; I am sure the answer is in the 
> documentation somewhere, but I am somehow missing it.
>
> I have an application which I am building into a Nix derivation; 
> everything seems to be working correctly there. I also have Charon 
> configured to deploy a cluster to EC2, with several packages from 
> nixpkgs installed; everything also seems to be working fine there.
>
> But it is not apparent to me how to install my derivation on the 
> deployed machines. I can see how to start it up once it's there, as a 
> service or using systemd, but I am somehow missing the directive to 
> actually copy the closure for my application to the server.
>
> Any help appreciated.
>
> Thanks very much,
>
> -Luke
>
>
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20130211/7ad2d521/attachment.html 


More information about the nix-dev mailing list