aboutsummaryrefslogtreecommitdiff
path: root/share/system/steam.nix
blob: 4e356bab107ff6583d1d710ca87ba52ac5b1b5b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, ... }:
{
  programs.steam.enable = true;

  nixpkgs.config = {
    allowUnfreePredicate =
      pkg:
      builtins.elem (lib.getName pkg) [
        "steam"
        "steam-original"
        "steam-runtime"
      ];
    packageOverrides = pkgs: {
      steam = pkgs.steam.override {
        extraPkgs =
          pkgs: with pkgs; [
            libgdiplus
            freetype
            samba
          ];
      };
    };
  };

  environment.sessionVariables = {
    # Steam needs this to find Proton-GE
    STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
    # note: this doesn't replace PATH, it just adds this to it
    PATH = [ "\${XDG_BIN_HOME}" ];
  };
}