Rebuild the world at DEF CON with the Nix Badge
  • Zig 46.5%
  • Nix 33.3%
  • C 13.9%
  • Python 4.7%
  • Awk 0.6%
  • Other 1%
Find a file
@mjones da589a0fe9
Merge pull request #6 from NixVegas/refactor-nixbadge2
refactor: improve nix-badge code
2026-09-05 16:45:05 -07:00
docs docs(polyglot): record riscv<->arm core-switch proven both directions (#48 done) 2026-09-04 18:54:38 -07:00
fix-gc-repro nix-badge/fix: THE root cause — never move the Engine after its first eval 2026-08-30 13:22:09 -07:00
modules/duo-s refactor: improve nix-badge code 2026-09-05 16:36:30 -07:00
pkgs refactor: improve nix-badge code 2026-09-05 16:36:30 -07:00
src Support Zig 0.15 2025-12-24 21:31:38 -08:00
.gitignore nix-badge/fix: force major-only GC collection (#34 airtight fix) 2026-08-29 21:33:19 -07:00
COPYING.md badge: init for hardware samples 2025-07-15 23:52:31 -07:00
default.nix treewide: nixfmt 2025-07-16 00:06:54 -07:00
flake.lock refactor: improve nix-badge code 2026-09-05 16:36:30 -07:00
flake.nix refactor: improve nix-badge code 2026-09-05 16:36:30 -07:00
README.md README: more updates 2026-08-15 02:12:08 -07:00
shell.nix treewide: nixfmt 2025-07-16 00:06:54 -07:00
v1.md flake: Updates for v2. 2026-08-15 02:06:57 -07:00

NixOS Badge

For the PCB, use our git server since it doesn't fit on GitHub anymore.

For the Nix Badge v1 readme, see v1.md.

This README is still very TODO, since this is the first release after DEF CON.

Hardware features

  • Dual-core ARM/RISC-V Milk-V Duo Module 01 (core selected at boot; both ARM and RISC-V boot)
  • 24 WS2812 LEDs on SPI3, powered from VSEL rather than the 3.3V buck (deliberately go red glitch-art on low battery)
  • AIC8800 WiFi (kernel driver needs a rebase from 5.10; we have the bootrom)
  • 0.5 TOPS TPU (works under Debian; drivers need forward-porting)
  • DSI → HDMI out via an Olimex-based bridge (needs a DSI kernel driver)
  • USB-C with mode switching
  • Serial + JTAG over the CH347
  • 10/100 Ethernet
  • Battery power (AA cells)
  • Voltage-measurement ADCs
  • Supercapacitor RTC circuit
  • SAO connector (6-pin keyed header)
  • OLED connector (4-pin I2C)
  • Front pin header for a Sharp Memory Display
  • Button

Build

  • Modify your config in modules/duo-s/common.nix
  • nix build will cross-compile a polyglot ARM and RISC-V image

Running

  • ARM is selected by default, set the physical builtins.currentSystem switch to aarch64-linux. Yes, really, this is not a joke.
  • Connect over serial (115200/8n1)
  • Run nix-badge to control the badge once it's booted