Nerves as a general purpose Elixir environment

nerves

#1

Is it possible to use Nerves as a general purpose Debian / Erlang / Elixir environment? I asked a similar question about installing Elixir here:

but as I think about it, the image that comes with BBGW is packed with stuff I don’t need or want. I’m wondering if I install Nerves on it, if I can ssh in, just scp my Elixir code to it and run it. Or, do I have to build a Nerves image every time I want to deploy some new code? That would be tedious during development.


#2

There are several ways to push code OTA once you get a Nerves system up and running, because yes, burning an image every time is extremely tedious.

Check out the nerves_init_gadget repo for a good place to start https://github.com/nerves-project/nerves_init_gadget

which uses nerves_firmware_ssh under the hood. https://github.com/nerves-project/nerves_firmware_ssh

and there’s also nerves_firmware_http as well https://github.com/ghitchens/nerves_firmware_http

once you have one of those running on your image you can just run mix do firmware, firmware.push <mdns or ip of device>