mix nbpr.install (NBPR v0.2.1)

Copy Markdown View Source

Installs and configures NBPR in a Nerves project so it can consume binary packages from the nbpr Hex organisation.

mix igniter.install nbpr

What this does

  • Adds :nbpr to the project's deps (handled by mix igniter.install).
  • Merges firmware: ["nbpr.fetch", "firmware"] into aliases: in mix.exs so mix firmware runs mix nbpr.fetch first to populate prebuilt binaries from GHCR.
  • Authenticates the local Hex client to the nbpr organisation using the publicly-shared read key, so subsequent mix deps.get calls can fetch :nbpr_* packages.

After running, add the binary packages you want to your deps/0:

{:nbpr_jq, "~> 1.0", organization: "nbpr"},
{:nbpr_dnsmasq, "~> 2.0", organization: "nbpr"}

Daemon-bearing packages (e.g. :nbpr_dnsmasq) generate a supervised module — add it to your supervision tree:

children = [
  {NBPR.Dnsmasq.Dnsmasq, config_file: "/etc/dnsmasq.conf"}
]