monado: Some changes
All checks were successful
check / check (push) Successful in 34s

This commit is contained in:
Florian RICHER 2025-07-19 22:24:45 +02:00
parent 00f0381893
commit ed1a4501f7
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
2 changed files with 22 additions and 5 deletions

View file

@ -18,5 +18,16 @@ in
sha256 = "x/X4HyyHdQUxn3CdMbWj5cfLvV7UyQe1D01H93UCk+M=";
fetchLFS = true;
};
xdg.configFile."openxr/1/active_runtime.json".source = "${pkgs.monado}/share/openxr/1/openxr_monado.json";
xdg.configFile."openvr/openvrpaths.vrpath".text = builtins.toJSON {
config = [ "${config.xdg.dataHome}/Steam/config" ];
external_drivers = null;
jsonid = "vrpathreg";
log = [ "${config.xdg.dataHome}/Steam/logs" ];
runtime = [ "${pkgs.opencomposite}/lib/opencomposite" ];
version = 1;
};
};
}

View file

@ -20,6 +20,14 @@ in
config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/VR
# https://github.com/NixOS/nixpkgs/issues/258196
#
# Monado can be run with the following commands:
# systemctl --user start monado.service
# systemctl --user stop monado.{service,socket}
# journalctl --user --follow --unit monado.service
# Games require LAUNCH OPTIONS: "env PRESSURE_VESSEL_FILESYSTEMS_RW=$XDG_RUNTIME_DIR/monado_comp_ipc %command%"
#
# Requires also `configs.monado.enable = true;` in home.nix for the user to work well
services.monado = {
enable = true;
defaultRuntime = true;
@ -29,12 +37,10 @@ in
systemd.user.services.monado.environment = {
STEAMVR_LH_ENABLE = "1";
XRT_COMPOSITOR_COMPUTE = "1";
};
environment.variables = {
STEAMVR_LH_ENABLE = "1";
XRT_COMPOSITOR_COMPUTE = "1";
WMR_HANDTRACKING = "0";
# Enable debugging if needed
XRT_DEBUG_GUI = "0";
};
boot.kernelPatches = mkIf cfg.enableAmdgpuPatch [