No description
  • Elixir 87.7%
  • HTML 4.7%
  • Nix 4.4%
  • JavaScript 2.3%
  • CSS 0.9%
Find a file
Pim Kunis 937ba1a9c3 add Nix flake devshells and fix NixOS compatibility
- Add flake.nix with two devShells: default (Phoenix UI) and firmware
  (FHS env for Nerves cross-compilation toolchain binaries)
- Upgrade Nerves to ~> 1.10 and nerves_system_rpi2 to ~> 2.0 (OTP 28)
  to fix Mix.Dep.load_on_environment breakage in Elixir 1.17+
- Remove Telegram integration and secrets.exs dependency
- Guard dev.exs host-only config (watchers, live_reload) behind
  Mix.target() == :host so firmware builds can serialise the config
- Fix vm.args.eex IEx startup for newer Elixir
- Add SSH authorized_keys for device access
- Update README with Nix devshell instructions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 21:10:09 +02:00
eisrom_firmware add Nix flake devshells and fix NixOS compatibility 2026-05-10 21:10:09 +02:00
eisrom_ui add Nix flake devshells and fix NixOS compatibility 2026-05-10 21:10:09 +02:00
.gitignore Port the frontend. 2019-07-14 00:28:47 +02:00
flake.lock add Nix flake devshells and fix NixOS compatibility 2026-05-10 21:10:09 +02:00
flake.nix add Nix flake devshells and fix NixOS compatibility 2026-05-10 21:10:09 +02:00
README.md add Nix flake devshells and fix NixOS compatibility 2026-05-10 21:10:09 +02:00

Esrom geocache

A Nerves-based geocache running on a Raspberry Pi 2. The device signals a morse code message via a GPIO-connected relay, served through a Phoenix LiveView web interface.

Prerequisites

  • Nix with flakes enabled
  • An SD card for the Raspberry Pi

Development (UI)

Enter the Phoenix dev shell and start the server:

nix develop
cd eisrom_ui
mix deps.get
mix phx.server

Visit http://localhost:4000.

Building firmware

Enter the Nerves firmware shell (an FHS-compatible environment required for the cross-compilation toolchain):

nix develop .#firmware

First time only — install the Nerves bootstrap archive:

mix archive.install hex nerves_bootstrap

Build the firmware:

cd eisrom_firmware
mix deps.get
mix firmware

Burn to SD card:

mix burn

To target a different board (default is rpi2):

MIX_TARGET=rpi4 nix develop .#firmware

Updating firmware over SSH

Once a device is running on the network:

mix upload nerves.local

SSH into the device

ssh nerves.local