[Nix-dev] How to copy files and share folders to nixops deployment

nickbh nick.b.h.alt at gmail.com
Thu Jan 7 13:36:06 CET 2016


Hi, 

I was wondering about something similar recently. I found a few options. 

I assume that with local machine you mean the container host, but if not and you just need to copy files ad hoc between the deploying machine and its deployments you could just use the nixops scp command. 
Run an NFS server on the host that the client containers connect to. 
Another option could be to make use of the recent https://github.com/NixOS/nixpkgs/pull/7993 <https://github.com/NixOS/nixpkgs/pull/7993> which makes it easy to expose files to NixOS containers. You are deploying via nixops which I don’t believe currently has the same functionality. However to work around that I think you should be able to declare the containers in the config of the container host and then deploy to them via the nixops ‘none’ backend. You would have to manually perform the ssh-keygen that the nixops container backend otherwise takes care of. 

Hope that helps, and I haven’t misstated anything. I am slowly getting to grips with the nix world myself. 

Nick

> On 6 Jan 2016, at 18:28, rohit yadav <rohityadav7787 at gmail.com> wrote:
> 
> Hi,
> 
> I am trying to deploy containers with nixops with ability to copy files and folder from local machine to a target folder inside the container. Also, I want to share folders from localhost machine to the container. How do I accomplish this? I could not find anything in the manual. 
> 
> One solution I tried sshfs after deployment of container but find that it complains about 'fuse' module not loaded though I listed inside the packages.
> 
> Thanks,
> Rohit
> _______________________________________________
> 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/20160107/a3c70f80/attachment-0001.html 


More information about the nix-dev mailing list