mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/monado: nixfmt
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
(cherry picked from commit 969ad19f9d
)
This commit is contained in:
parent
5d3b245433
commit
443aea210c
1 changed files with 37 additions and 33 deletions
|
@ -1,39 +1,43 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "monado";
|
||||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "monado";
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.graphics.enable = true;
|
||||
users.users.alice = {
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
{
|
||||
hardware.graphics.enable = true;
|
||||
users.users.alice = {
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
};
|
||||
|
||||
services.monado = {
|
||||
enable = true;
|
||||
defaultRuntime = true;
|
||||
};
|
||||
# Stop Monado from probing for any hardware
|
||||
systemd.user.services.monado.environment.SIMULATED_ENABLE = "1";
|
||||
|
||||
environment.systemPackages = with pkgs; [ openxr-loader ];
|
||||
};
|
||||
|
||||
services.monado = {
|
||||
enable = true;
|
||||
defaultRuntime = true;
|
||||
};
|
||||
# Stop Monado from probing for any hardware
|
||||
systemd.user.services.monado.environment.SIMULATED_ENABLE = "1";
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
let
|
||||
userId = toString nodes.machine.users.users.alice.uid;
|
||||
runtimePath = "/run/user/${userId}";
|
||||
in
|
||||
''
|
||||
machine.succeed("loginctl enable-linger alice")
|
||||
machine.wait_for_unit("user@${userId}.service")
|
||||
|
||||
environment.systemPackages = with pkgs; [ openxr-loader ];
|
||||
};
|
||||
machine.wait_for_unit("monado.socket", "alice")
|
||||
machine.systemctl("start monado.service", "alice")
|
||||
machine.wait_for_unit("monado.service", "alice")
|
||||
|
||||
testScript = { nodes, ... }:
|
||||
let
|
||||
userId = toString nodes.machine.users.users.alice.uid;
|
||||
runtimePath = "/run/user/${userId}";
|
||||
in
|
||||
''
|
||||
machine.succeed("loginctl enable-linger alice")
|
||||
machine.wait_for_unit("user@${userId}.service")
|
||||
|
||||
machine.wait_for_unit("monado.socket", "alice")
|
||||
machine.systemctl("start monado.service", "alice")
|
||||
machine.wait_for_unit("monado.service", "alice")
|
||||
|
||||
machine.succeed("su -- alice -c env XDG_RUNTIME_DIR=${runtimePath} openxr_runtime_list")
|
||||
'';
|
||||
})
|
||||
machine.succeed("su -- alice -c env XDG_RUNTIME_DIR=${runtimePath} openxr_runtime_list")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue