nixos/wivrn: add option for Steam support

Add a new `services.wivrn.steam.enable` option to let the user enable or
disable Steam support. This option is enabled by default to not break
existing setups.

Signed-off-by: David Wronek <david.wronek@mainlining.org>
This commit is contained in:
David Wronek
2026-03-15 16:28:40 +01:00
parent 3f7e2ac81e
commit ea40758e61
+7 -3
View File
@@ -106,6 +106,10 @@ in
};
steam = {
enable = lib.mkEnableOption "Steam support" // {
default = true;
};
importOXRRuntimes = mkEnableOption ''
Sets `PRESSURE_VESSEL_IMPORT_OPENXR_1_RUNTIMES` system-wide to allow Steam to automatically discover the WiVRn server.
@@ -211,12 +215,12 @@ in
}
);
# Needs Steam in the PATH to allow launching games from the headset
path = [ cfg.steam.package ];
path = mkIf cfg.steam.enable [ cfg.steam.package ];
wantedBy = mkIf cfg.autoStart [ "default.target" ];
restartTriggers = [
cfg.package
cfg.steam.package
];
]
++ lib.optionals cfg.steam.enable [ cfg.steam.package ];
};
};
};