VR on NixOS work
After more than a year without Windows and so Desktop VR, finally VR on NixOS!
Installation
Here the main resources for VR on NixOS and for Linux:
I also made an article on the matter.
Software
Here some parts of my configuration.nix
:
{ config, pkgs, ... }:
{
services.wivrn = {
enable = true;
openFirewall = true;
defaultRuntime = true;
};
environment.systemPackages = with pkgs; [
monado-vulkan-layers
opencomposite
];
system.stateVersion = "25.05";
}
Before going throughout configuration with the VR applications, let’s break down the nix
file:
- WiVRn: Wireless Virtual Reality streaming for Linux, it help by giving a GUI for using Monado, the XR (not VR) runtime.
- Vulkan Layers for Monado (
monado-vulkan-layers
): Make Vulkan work with Monado. It is used to make Valve’s Proton work Monado, since Proton used Vulkan. - OpenComposite: Reimplementation of Valve’s OpenVR, translating calls to OpenXR. So convert VR to XR to be used by Monado and thus WiVRn.
Configuration files
Please replace username
by your user (echo $USER
in the terminal to get it).
/home/username/.config/openvr/openvrpaths.vrpath
{
"config" :
[
"/home/username/.local/share/Steam/config"
],
"external_drivers" : null,
"jsonid" : "vrpathreg",
"log" :
[
"/home/username/.local/share/Steam/logs"
],
"runtime" :
[
"/run/current-system/sw/lib/opencomposite"
],
"version" : 1
}
/home/username/.config/openxr/1/openxr_wivrn.json
{
"file_format_version": "1.0.0",
"runtime": {
"name": "Monado",
"library_path": "/run/current-system/sw/lib/wivrn/libopenxr_wivrn.so",
"MND_libmonado_path": "/run/current-system/sw/lib/wivrn/libmonado_wivrn.so"
}
}