No description
  • Rust 81.5%
  • Nix 11.5%
  • HTML 7%
Find a file
Andreas Rammhold 080f62277d Add a NixOS module publishing web decks through nginx
Running a deck on a phone means reaching it from the phone, which in
practice means a name, TLS and something asking who you are — the deck
presses real buttons on a live show. The module does that part:
instances are named (services.web-deck.instances.<name>), each with its
own Companion, port and htpasswd file, and nginx publishes them.

Instances rather than a singleton because one machine may front several
Companion instances — a stage rig and a booth rig, or one deck per
person. They can share a virtual host under different path prefixes,
so a single domain and certificate covers all of them while each keeps
separate credentials. nginx strips the prefix and the page looks for
its WebSocket relative to wherever it was loaded, so the deck never
needs to know where it is mounted.

Publishing without a basicAuthFile is refused by an assertion rather
than left to the operator to remember. TLS stays in the host's own
virtual host config, which merges with ours — worth adding, since
browsers only grant the screen wake lock on a secure origin.

The VM test runs two decks on one virtual host and checks what would
actually break in production: per-path credentials (each rejects the
other's), the redirect for a missing trailing slash, a real WebSocket
client registering a surface through the proxy, unauthenticated
sockets refused, and each deck talking to its own Companion.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FmVqDpdemjeXPfTYKxfz5i
2026-07-31 20:17:19 +02:00
crates Add keyboard hotkeys to virtual-deck 2026-07-31 20:10:23 +02:00
docs Add a NixOS module publishing web decks through nginx 2026-07-31 20:17:19 +02:00
etc/udev/rules.d Add Ulanzi support 2026-07-28 17:33:31 +02:00
nix Add a NixOS module publishing web decks through nginx 2026-07-31 20:17:19 +02:00
.envrc Add Nix flake devshell with treefmt and pre-commit hooks 2026-07-15 00:45:11 +02:00
.gitignore Add Nix flake devshell with treefmt and pre-commit hooks 2026-07-15 00:45:11 +02:00
Cargo.lock Add web-deck: a virtual deck that runs in the browser 2026-07-31 20:08:25 +02:00
Cargo.toml Add web-deck: a virtual deck that runs in the browser 2026-07-31 20:08:25 +02:00
CLAUDE.md Add project brief and TODO tracking 2026-07-15 00:44:19 +02:00
flake.lock Add Nix flake devshell with treefmt and pre-commit hooks 2026-07-15 00:45:11 +02:00
flake.nix Add a NixOS module publishing web decks through nginx 2026-07-31 20:17:19 +02:00
LICENSE License the project under MIT, following upstream 2026-07-15 00:59:38 +02:00
TODO.md Add a NixOS module publishing web decks through nginx 2026-07-31 20:17:19 +02:00
treefmt.nix Add web-deck: a virtual deck that runs in the browser 2026-07-31 20:08:25 +02:00