No description
  • Rust 61.6%
  • Nix 30.8%
  • C 3.4%
  • Shell 2.4%
  • Slint 1%
  • Other 0.7%
Find a file
Jarrad Hope 64e192b55a adr: 0033 camera-owner body (one titan, every device a target; S-L/S-M) and 0034 open-core 6DoF rung (S-J/S-K)
Both record the owner's 2026-10-11 rulings with budget-impact statements (overview invariant 9);
their own proposals (two-axis target vocabulary, synthetic target, org.mura.CameraOwner1,
PS2 field set, KB4 mapping) are implemented as proposed and flagged in the spec's PRA register.
docs/README.md index rows; implementation-path §5.1 dated notes point at both.
2026-10-11 13:39:21 +02:00
assets/branding Recovery environment + failure feedback (implementation-path §4 track; research/56 §3, research/57). modules/os/recovery.nix: plymouth in the initrd with the per-device Mura theme (pkgs/mura-plymouth-theme composites assets/branding/recovery-mode.png — the mascot, 2048², 8 bpc RGBA — per eye from mura.hardware.panel/displays: scaled to 85% of eye height, centred, duplicated when one output spans both panels; text is plymouth's, sized to the panel); on the FIRST hard preflight failure mura-preflight-feedback puts what failed and the ways in (ssh mura@172.16.42.1, hotspot SSID+PSK, docs) on the panels — plymouth-quit/-wait are ordered after the preflight and skipped on the /run/mura/preflight.failed marker so the splash stays when there is no greeter; the setup launcher shows the same lines. The recovery environment is the SAME initrd booted to mura-recovery.target (systemd's boot-menu-entry shape; Mobile NixOS's recovery-is-stage-1): systemd-networkd on usb0 (ConfigureWithoutCarrier; the gadget unit now orders after udevd so its netdev uevent is processed live — found here: coldplug missed it and networkd waited forever), mura-recovery-identity (the device's own host key from /persist mounted read-only, else generated with its fingerprint shown), mura-recovery-sshd (root, the declared self-builder keys, banner with the fingerprint), mura-recovery-screen, and the mura-recovery menu: factory-reset (asks 'yes, erase', then systemd-repart --factory-reset=yes over the FactoryReset=yes definitions — deletes and re-creates exactly the state partitions from early boot's clean state — and reboots), switch-slot where the family provides it, reboot, poweroff. Messages go up in ≤200-byte chunks (plymouth's client protocol asserts at 255). health.nix: at the threshold the counter runs mura.recovery.rebootCommand (uefi-rauc: systemctl reboot --boot-loader-entry=recovery, the LoaderEntryOneShot variable) or falls back to mura-recovery.target. uefi-rauc: recovery.conf BLS entry (same Image+initrd, rd.systemd.unit=mura-recovery.target, never counted), FactoryReset=yes on syspersist and home in the image and runtime repart definitions. The VM's persist stand-in becomes a GPT syspersist partition created by systemd-repart in stage 1 (FactoryReset=yes), the image's shape; virtio_gpu in the VM initrd for plymouth. mura-preflight also writes /run/mura/preflight.summary (plain lines) and the .failed marker. tests/vm/recovery.nix (nix build .#vm-test-recovery; testing.initrdBackdoor): environment up in stage 1 and no root mount; plymouth drew the screen; ssh from the cable's host end (dummy_hcd, static address) with the fixture key prints the menu and the banner fingerprint; the device's own key once /persist is readable; a wrong answer erases nothing; the right one wipes and re-creates exactly the one partition. tests/vm/health.nix: the feedback lines and the skipped plymouth-quit. tests/persist.nix: the GPT stand-in, the Frame's FactoryReset partitions, recovery.conf on the ESP and the reboot command. All five fixtures green; nix flake check green. Pending: the counter → recovery.conf reboot on the deckard image (no aarch64 builder on this host). 2026-09-25 14:24:29 +02:00
contracts mura: commit working tree across Galaxy XR, docs, masque, and PFDM streams 2026-10-06 20:33:02 +02:00
devices xr: unify camera ownership and tracking seams 2026-10-11 13:11:58 +02:00
docs adr: 0033 camera-owner body (one titan, every device a target; S-L/S-M) and 0034 open-core 6DoF rung (S-J/S-K) 2026-10-11 13:39:21 +02:00
families mura: commit working tree across Galaxy XR, docs, masque, and PFDM streams 2026-10-06 20:33:02 +02:00
lib xr: unify camera ownership and tracking seams 2026-10-11 13:11:58 +02:00
modules xr: unify camera ownership and tracking seams 2026-10-11 13:11:58 +02:00
pkgs xr: unify camera ownership and tracking seams 2026-10-11 13:11:58 +02:00
profiles Integrate PFDM NCM SSH and pancake account 2026-10-07 10:51:02 +02:00
protocols ADR 0006 amendment 4: the container pair replaces zxr-shell-v2 as the 3D contract; Monado composites; zxr is the workspace controller 2026-09-29 19:54:57 +02:00
references references: pin runtime and middleware comparables 2026-10-11 13:11:40 +02:00
soc mura: commit working tree across Galaxy XR, docs, masque, and PFDM streams 2026-10-06 20:33:02 +02:00
specs specs/runtime-architecture: rev 0.4 — S-L (one titan body, every device a target; pfdm-camera-server removed) and S-M (layered readiness composite) 2026-10-11 12:25:22 +02:00
spikes rename spatial-os to Mura 2026-09-23 22:02:21 +02:00
tests xr: unify camera ownership and tracking seams 2026-10-11 13:11:58 +02:00
.gitignore gitignore: editor workspace files (*.code-workspace) 2026-09-27 18:40:10 +02:00
AGENTS.md recovery: dedicated rescue partition and proven access paths 2026-09-26 01:21:30 +02:00
flake.lock pfdm: camera.ko builds against the Mura kernel; the IPD readback in the driver; boot 13 prepared 2026-10-09 15:58:21 +02:00
flake.nix xr: unify camera ownership and tracking seams 2026-10-11 13:11:58 +02:00
README.md Integrate PFDM NCM SSH and pancake account 2026-10-07 10:51:02 +02:00

Mura — spatial computing for everyone

Mura

A Nix-built, NixOS-based, Wayland-based Linux XR distribution targeting many standalone VR headsets (Oculus Quest 1, Lynx R1, Samsung Galaxy XR, Play For Dream MR, Valve Steam Frame, …). It turns pinned vendor firmware ("donor") inputs, device definitions, and pinned sources into reproducible flashable artifacts — building the distribution independently of the device, then qualifying and deploying it together with an explicit, versioned hardware-adaptation bundle.

Status: research + architecture + initial scaffold. The virtual-headset VM smoke target builds and nix flake check passes. Real device ports begin with a Lynx R1 hardware spike (see docs/architecture/design-backlog.md).

Where things are

  • docs/ — research (7 deep-dives + synthesis), architecture (5 docs + 5 ADRs), the red-team review, and its disposition.
  • lib/contract/ — the typed mura.* device contract (NixOS-module options + assertions).
  • lib/donor/, lib/images/ — donor-pipeline and image-variant builders (typed stubs until the Lynx spike, per the design backlog).
  • modules/{os,xr,adaptation} — the common distribution, XR runtime wiring, and per-subsystem adaptation backends.
  • soc/, families/, devices/ — the device → SoC-family → common decomposition.
  • references/ — git-ignored study clones, reproducible from references/clone.sh + references/MANIFEST.json.

Quick start

nix flake check                                  # formatting + contract + VM smoke build
nix build .#packages.x86_64-linux.virtual-headset-vm
nix develop                                      # dev shell with donor-pipeline tooling

Development

Three loops, cheapest first — pick by what you're changing:

Rung 1 — nix run .#dev-session (compositor/shell/XR work; iteration = process relaunch). The spatial session as a plain window on your desktop: a nested Wayland compositor (sway until zxr M1; Alt+Return = terminal, Alt+Shift+E = quit) plus Monado running the simulated HMD (XR_RUNTIME_JSON exported inside the session; windowless null compositor by default). Flags: --client (xrgears OpenXR smoke — adds Monado's mirror window showing the composited XR view), --godot (the Godot spatial-container conformance client, pkgs/spatial-container-sample — needs a Godot master built once with nix develop .#godot, see its README), --mirror/--no-mirror, --rotate (canned head motion), --controllers, --no-monado, --verbose; --zxr runs zxr in the compositor slot (R0 frame path + the M1 input floor: zxr ctl <sock> source hand-right value pinch 0.9 and friends inject synthetic input, ctl journal prints the counters — specs/zxr-core.md §8, §11). No VM, no image.

Rung 2 — nix run .#virtual-headset-vm (module/system integration; iteration = incremental rebuild, no image assembly — the VM shares the host /nix/store). Two fixtures, one per login profile (docs/architecture/implementation-path.md §3c): virtual-headset-vm is the default image — autologin as pancake (initial password pancake) straight into the stand-in session (sway until zxr M1); virtual-headset-multiuser-vm is the greeter shape — the stand-in greeter (cage + gtkgreet until G2), log in as mura / mura (a fixture account, tests/vm/fixture-user.nix). virgl-accelerated GL, 8 GiB/4 cores; ssh -p 2221 pancake@localhost (initial password pancake). State persists in the VM's .qcow2 beside the working tree — delete it for a fresh boot.

Rung 2 automated — nix build .#vm-test-default-image / .#vm-test-multi-user / .#vm-test-oob / .#vm-test-health: the D-track's exit criteria as NixOS VM tests (tests/vm/); oob drives the USB gadget (dummy_hcd, both ends in the VM), the provisioning hotspot (mac80211_hwsim, a second radio as the phone) and the mura-setup stub; health forces a hard preflight failure and walks the crash-loop ladder to the recovery target and back; .#vm-test-scene is the one with a picture — Monado's main compositor drawing zxr's greeter scene into a test-only cage on the VM's KMS output, screenshotted and asserted. On demand only — they boot a VM and take minutes, so they are not part of nix flake check.

Rung 3 — nix run .#frame-vm-run -- <image.raw[.zst]> (image/update machinery only): the Steam Frame aarch64 image under full-system emulation, including the RAUC A/B update round-trip (docs/research/33 §9). The default build command is:

nix run .#frame-build

frame-build submits packages.aarch64-linux.frame-image to nixbuild.net as a native aarch64-linux remote build, with the proven 16-job limit and builder-side substitution (ADR 0004, research/33 §10). It uses the invoking user's ordinary SSH key and known_hosts; it neither reads a root-owned key nor changes /etc/nix. Pass another flake target and normal nix build flags after --, for example:

nix run .#frame-build -- .#packages.aarch64-linux.frame-bundle -o result-frame-bundle

The recovery-entry proof has a reproducible test-only image. It forces preflight P2 hard, cycles the first failed boot, then exercises the production threshold → one-shot recovery.conf → mura-recovery.target path:

nix run .#frame-build -- \
  .#packages.aarch64-linux.frame-recovery-proof-image \
  -o result-frame-recovery-proof
FRAME_VM_DIR=/path/on/fast-storage \
  nix run .#frame-vm-run -- \
  result-frame-recovery-proof/mura-deckard.raw.zst

Stop QEMU after the serial log reaches RECOVERY_PROOF_OK; the evidence expected before it is the first failure/cycle, the second failure reaching the threshold, and systemd-boot selecting recovery.conf → the dedicated recovery UKI. Keep FRAME_VM_DIR on fast local storage: QEMU TCG writes are storage-bound.

Design rule

Build the distribution independently of the device, but qualify and deploy it together with an explicit, versioned hardware dependency set.

See docs/architecture/overview.md for the layers, boundaries, and non-negotiable invariants.