Steam: Difference between revisions

imported>Hypnosis2839
gamescope: update gamescope instructions
imported>Hypnosis2839
Adding missing dependencies: use programs.steam.package option instead of environment.systemPackages
Line 64: Line 64:
== Adding missing dependencies ==
== Adding missing dependencies ==


<syntaxHighlight lang=nix>
In some cases, you may need to override steam to provide issing dependencies.
  nixpkgs.overlays = [
Use the <code>programs.steam.package</code> for this.
    (final: prev: {
      steam = prev.steam.override ({ extraPkgs ? pkgs': [], ... }: {
        extraPkgs = pkgs': (extraPkgs pkgs') ++ (with pkgs'; [
          libgdiplus
        ]);
      });
    })
  ];
</syntaxHighlight>


=== Bumblebee and Primus ===
=== Bumblebee and Primus ===
<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
   environment.systemPackages = with pkgs; [
   programs.steam.package = pkgs.steam.override {
    (steam.override {
    withPrimus = true;
      withPrimus = true;
    extraPkgs = pkgs: [ bumblebee glxinfo ];
      extraPkgs = pkgs: [ bumblebee glxinfo ];
  };
    }).run
  ];
</syntaxHighlight>
</syntaxHighlight>


Line 89: Line 78:
<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
   programs.java.enable = true;  
   programs.java.enable = true;  
   environment.systemPackages = with pkgs; [
   programs.steam.package = pkgs.steam.override { withJava = true; };
    (steam.override { withJava = true; })
  ];
</syntaxHighlight>
</syntaxHighlight>


You can test java availability by invoking chrooted bash instance: <code>steam-run bash</code> and then typing: <code>java -version</code>. Can be combined with extra packages above.
== gamescope ==


=== gamescope ===
To use the [https://github.com/ValveSoftware/gamescope gamescope] compositor, which enables features such as resolution upscaling and stretched aspect ratios (such as 4:3), set
 
<syntaxHighlight lang=nix>
programs.steam.gamescopeSession.enable = true;
</syntaxHighlight>


To use the [https://github.com/ValveSoftware/gamescope gamescope] compositor, which enables features such as resolution upscaling and stretched aspect ratios (such as 4:3), set <code>programs.steam.gamescopeSession.enable = true;</code> in your system configuration.
in your system configuration.


== Troubleshooting ==
== Troubleshooting ==