Escape your fate at DEF CON with the NixOS Badge
  • Python 86.2%
  • Nix 12.6%
  • Ruby 0.9%
  • HTML 0.3%
Find a file
2026-08-15 02:49:38 -07:00
.claude/skills/kicad-schematic-from-reference
docs docs: update REV-B 2026-07-06 15:20:19 -07:00
img
kicad silk: remove order number 2026-07-14 21:32:55 -07:00
migration
pkgs
script default.nix: render reference diagram for UV printing 2026-07-03 23:19:52 -07:00
svg kicad: fix SD pinout and design review items 2026-07-06 05:06:42 -07:00
.gitignore
COPYING
default.nix default.nix: render reference diagram for UV printing 2026-07-03 23:19:52 -07:00
flake.lock default.nix: render pdf and png proof at 1200 dpi 2026-07-03 19:16:41 -07:00
flake.nix default.nix: render pdf and png proof at 1200 dpi 2026-07-03 19:16:41 -07:00
README.md README: update photo link 2026-08-15 02:49:38 -07:00

NixOS Badge

This repo contains KiCad files and Nix expressions for fabricating the NixOS Badge using PCBWay.

Developing

  • nix develop

Note that you will need a machine with a reasonably good GPU to edit the board. The artwork makes a recent AMD or NVIDIA chip a necessity.

Don't try to understand the routing, you will go mad

Building

  • nix build ^* or nix build .#render^*
    • Gerbers are in result
    • Fab output (nixos_1.zip Gerber archive; bom.csv and positions.csv for placement) are in result-fab
      • This is repackaged to nixos_1.7z to fit PCBWay's file upload service
    • Renders are in result-render if you want a render
    • DRC and ERC checks are in result-check

Use NixOS/branding and produce the output .#nixos-branding.artifacts.internal.nixos-logomark-default-gradient-none.

Reference design

  • The closest reference design is included in the accompanying materials for the duo-module-01.
  • The DSI/HDMI bridge was based on a design by Olimex, released under CERN Open Hardware License v2 (Strongly Reciprocal)

Fabrication playbook

Unfortunately you can't just deploy-rs to PCBWay but we can get close.

  • Upload the gerber bundle
  • Configure fabrication options
    • Base material: FR4
    • Delivery Format: Single PCB (panels were actually more expensive)
    • Color: White
    • Thickness: 1.6mm
    • Tracks: 4/4mil
    • Surface finish: ENIG
    • Silkscreen: Colorful, dual-sided
    • Vias: Untented
    • Min via hole size: 0.3mm
    • Include product number: Specify location ("WayWayWay" silkscreen on back)
  • Configure assembly options
    • Assembly Side: both sides
  • Upload bom.csv and positions.csv from the fab output as BOM and centroid files
    • Note that a couple components are deliberately left out

Lead time is expected to be at least ~20 days (double badge v1 in this economy).

Things we know work

  • Battery power (you can get a few hours out of it, but it can be very battery hungry)
  • Bling (note that if the battery gets low it becomes red glitch art -- the LEDs are connected to VSEL instead of the 3.3v buck, this was mostly a deliberate design choice because the cosmetic effects are interesting)
  • Serial through the CH347 (works great)
  • Both ARM and RISC-V boot
  • SD card works (some higher speed ones may have trouble, YMMV)
  • Ethernet and USB work fine

Things that have not been tested

  • HDMI (needs a kernel driver port for the DSI out)
  • USB-C mode switching
  • JTAG (CH347 serial supports it, we could use an OpenOCD config)
  • ARM/RISC-V persistent latch for AUTO mode

Things that need software support

(see https://github.com/NixVegas/BadgeOS)

  • WiFi (kernel driver needs rebase from 5.10 though we have the bootrom)
  • TPU (0.5 TOPS, tested with debian but drivers need forward port)
  • RISC-V little core
  • SAO (likely enable in device tree)
  • Voltage measurement ADCs

We recommend pointing your LLM of choice at this repo and your hardware to work through the gnarly driver porting. We're doing it.

Trimmings

Please use this badge in ways we could never have imagined, but these are the intended ways: