Commit ea40758e authored by David Wronek's avatar David Wronek
Browse files

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: default avatarDavid Wronek <david.wronek@mainlining.org>
parent 3f7e2ac8
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -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 ];
        };
      };
    };