Unverified Commit 9c2164ec authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

nixos/wivrn: add option for Steam support and fix wayvr (#500189)

parents cdf44dbd ea40758e
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -98,6 +98,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.

@@ -203,12 +207,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 ];
        };
      };
    };
+5 −0
Original line number Diff line number Diff line
@@ -75,6 +75,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
  ]
  ++ lib.optionals withOpenVR [ "openvr" ];

  postInstall = ''
    install -D wayvr/wayvr.desktop -t $out/share/applications
    install -D wayvr/wayvr.svg -t $out/share/icons/hicolor/scalable/apps
  '';

  passthru = {
    tests.testVersion = testers.testVersion { package = wayvr; };