mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
nixos/monado: add forceDefaultRuntime option
This option replaces the active runtime manifest in the user directory.
Games running through Steam's Pressure Vessel cannot read /etc so
forcefully overriding the file every time the service starts, will allow
those games to use Monado.
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
(cherry picked from commit 91fee43100
)
This commit is contained in:
parent
443aea210c
commit
942f21f944
2 changed files with 34 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
name = "monado";
|
||||
|
||||
|
@ -16,6 +16,8 @@ import ./make-test-python.nix (
|
|||
services.monado = {
|
||||
enable = true;
|
||||
defaultRuntime = true;
|
||||
|
||||
forceDefaultRuntime = true;
|
||||
};
|
||||
# Stop Monado from probing for any hardware
|
||||
systemd.user.services.monado.environment.SIMULATED_ENABLE = "1";
|
||||
|
@ -30,6 +32,9 @@ import ./make-test-python.nix (
|
|||
runtimePath = "/run/user/${userId}";
|
||||
in
|
||||
''
|
||||
# for defaultRuntime
|
||||
machine.succeed("stat /etc/xdg/openxr/1/active_runtime.json")
|
||||
|
||||
machine.succeed("loginctl enable-linger alice")
|
||||
machine.wait_for_unit("user@${userId}.service")
|
||||
|
||||
|
@ -37,6 +42,9 @@ import ./make-test-python.nix (
|
|||
machine.systemctl("start monado.service", "alice")
|
||||
machine.wait_for_unit("monado.service", "alice")
|
||||
|
||||
# for forceDefaultRuntime
|
||||
machine.succeed("stat /home/alice/.config/openxr/1/active_runtime.json")
|
||||
|
||||
machine.succeed("su -- alice -c env XDG_RUNTIME_DIR=${runtimePath} openxr_runtime_list")
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue