Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

badge.oled

Declared in BadgeOS/modules/sg2k/oled.nix.

badge.oled.enable

Run the oled engine on the optional SAO OLED. Without it the WS2812 ring still animates.

Type: boolean

Default:

config.hardware.sg2k.oled.enable

Declared by:

badge.oled.backend

The evaluator for the eval screens: “fix” (embedded) or “nix” (the Nix C API, aarch64 only; elsewhere it falls back to fix). A >5 s button hold flips it and saves the choice to /etc/nix-badge/oled.backend, which wins over this.

Type: one of “fix”, “nix”

Default:

"fix"

Declared by:

badge.oled.blingDir

Directory of pure-Nix LED patterns (*.nix, in name order) that a short press cycles through, by writing the next one into leds.conf.

Type: string

Default:

"/etc/nix-badge/bling.d"

Declared by:

badge.oled.button

Device-tree gpio-line-name of the button: a short press cycles the LED pattern, a long one the OLED screen. Without such a line the engine runs on SIGUSR1/2 alone. btn-boot-n belongs to bootswap.

Type: string

Default:

"user-btn"

Declared by:

badge.oled.controller

Which controller drives the panel. “auto” detects automatically.

Type: one of “auto”, “ssd1306”, “sh1106”

Default:

"auto"

Declared by:

badge.oled.dynamicNix

Link the engine’s Nix C API dynamically: seconds instead of a ~15-minute static link, for a bigger closure.

Type: boolean

Default:

true

Declared by:

badge.oled.ethInterface

The wired interface whose IPv4 address the net screen shows (passed as --eth-iface).

Type: string

Default:

"eth0"

Example:

"end0"

Declared by:

badge.oled.evalDir

A directory of *.nix screens, read at run time in name order. They may import <nix-badge/lib/...> (nix-badge=/etc/nix-badge).

Type: null or string

Default:

null

Declared by:

badge.oled.evalScreens

Pure-Nix OLED screens, scope: { bitmap = [ <int> ... ]; nextMs; } (4 page bytes per int, little-endian), compiled into one shared fix Engine. A long press or SIGUSR2 cycles them; a screen that fails to compile is skipped.

Type: list of absolute path

Default:

[ ]

Example:

[
  "${pkgs.bling-badapple-live}/badapple-live.nix"
]

Declared by:

badge.oled.gcBudgetMb

The fix Engine’s GC collection line, in MiB: the heap-reserved size at which an allocation triggers a collection.

Type: positive integer, meaning >0

Default:

32

Declared by:

badge.oled.height

OLED height in pixels (32 or 64 rows).

Type: one of 32, 64

Default:

32

Declared by:

badge.oled.width

OLED width in pixels (128 for the SSD1306).

Type: positive integer, meaning >0

Default:

128

Declared by:

badge.oled.wlanInterface

The wireless interface whose IPv4 address the net screen shows (passed as --wlan-iface).

Type: string

Default:

"wlan0"

Example:

"wlp1s0"

Declared by: