mirror of
https://github.com/0x1d/nix.git
synced 2026-11-16 00:42:27 +01:00
2.9 KiB
2.9 KiB
Breezy Desktop / XR Glasses (Viture)
Head-tracking support for XR glasses (Viture Luma Ultra here) via
wheaney/XRLinuxDriver, packaged as a
NixOS module in the local flake /home/master/src/breezy-desktop-nix.
How it is wired
/home/master/src/breezy-desktop-nix— local flake providing:packages.xrlinuxdriver(the xrDriver daemon + CLI + udev rules)packages.breezy-gnome,packages.breezy-desktop-ui,breezy-desktop(meta)nixosModules.default(services.breezy-desktop)
- This flake imports it as a
path:input pinned inos/flake.lockunder the keyxrlinuxdriver, and applies the module viabreezyModule:
# os/flake.nix
(breezyModule { gnome = true; }) # in the `gnome` host
The module enables the xr-driver user service, udev rules (services.udev.packages),
uinput kernel module and (with gnome = true) the GNOME session integration.
Deploying
cd ~/src/breezy-desktop-nix # make package changes here
nix build .#xrlinuxdriver # quick sanity build
# 1. bump the path-pin of the module flake (must run as master, NOT root)
cd ~/src/nix
nix flake update --flake ./os xrlinuxdriver
# 2. rebuild
sudo nixos-rebuild --flake ./os#gnome switch --impure
Gotchas
sudo nixos-rebuild --flake ./os#gnome switch --impuremay fail with "repository path is not owned by current user" — that's thepath:input (a plain in-repo directory) being hashed by libgit2 as root. Fix: run thenix flake update/nix buildsteps asmasterfirst, then the switch. Worst case build the toplevel as master and switch as root:nix build ~/src/nix/os#nixosConfigurations.gnome.config.system.build.toplevel \ --impure -o /tmp/system # as root: nix-env -p /nix/var/nix/profiles/system --set /tmp/opencode/system /tmp/opencode/system/bin/switch-to-configuration switch- Stale user unit:
~/.config/systemd/user/xr-driver.servicemay contain an old store-path symlink that shadows the new unit from/etc/systemd/user/. If the service fails right after an update with an oldxrlinuxdriver-<version>path inExecStart:rm ~/.config/systemd/user/xr-driver.service systemctl --user daemon-reload && systemctl --user restart xr-driver - Transient
[ERROR] Segmentation faultlines in~/.local/state/xr_driver/driver.logcoming fromlibcarina_vio.so/libglasses.soare a known Viture SDK quirk and usually harmless.
Upgrading the driver
- Update
rev/versionin~/src/breezy-desktop-nix/package.nix(check upstreamCMakeLists.txtfor moved submodules/cargo roots — upstream restructures between versions). - Replace the
hashwith the hash Nix prints on the first build failure. cargoRootmay need updating (as of 2.11.9:modules/xrealOneDeviceKit/modules/xreal_one_driver).- Deploy as above.