blob: 1fe029831084dc7960f4a811d4e3f2405b204fab [file] [log] [blame]
Skyler Grey252927a2022-10-18 22:18:15 +01001{ pkgs
2, username
Skyler Grey632d68a2023-02-21 10:26:28 +00003, config
Skyler Grey252927a2022-10-18 22:18:15 +01004, ...
Skyler Grey1010db92022-09-05 03:21:48 +01005}: {
Skyler Grey944dfa22022-09-01 23:47:48 +01006 config = {
7 programs.steam = {
8 enable = true;
9 remotePlay.openFirewall = true;
Skyler Grey632d68a2023-02-21 10:26:28 +000010
11 package = pkgs.steam.override
12 {
13 extraLibraries = pkgs: with config.hardware.opengl; [ package ] ++ extraPackages;
14 };
Skyler Grey944dfa22022-09-01 23:47:48 +010015 };
16 hardware.steam-hardware.enable = true;
17
Skyler Greyc44e39a2022-10-31 00:32:26 +000018 internal.allowUnfree = [ "steam" "steam-original" "steam-runtime" "steam-run" ];
Skyler Grey7c61e7a2022-10-31 00:22:11 +000019 environment = {
Skyler Grey252927a2022-10-18 22:18:15 +010020 persistence."/large/persist".users.${username}.directories = [ ".local/share/Steam" ];
21 systemPackages = with pkgs; [
22 gamescope
Skyler Greyc44e39a2022-10-31 00:32:26 +000023 gamemode
24 sfs-select /*(
Skyler Grey7c61e7a2022-10-31 00:22:11 +000025 writeTextDir "share/applications/steam.desktop" ''
26 [Desktop Entry]
27 Name=Steam
28 Comment=Application for managing and playing games on steam
29 Exec=${pkgs.gamescope}/bin/gamescope -w 1920 -h 1080 -- ${pkgs.steam}/bin/steam
30 Icon=steam
31 Terminal=false
32 Type=Application
33 Categories=Network;FileTransfer;Game;
34 MimeType=x-scheme-handler/steam;x-scheme-handler/steamlink;
35 Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends;
36 PrefersNonDefaultGPU=true
37 X-KDE-RunOnDiscreteGpu=true
38 ''
Skyler Grey632d68a2023-02-21 10:26:28 +000039 )*/
Skyler Grey252927a2022-10-18 22:18:15 +010040 ];
Skyler Grey7c61e7a2022-10-31 00:22:11 +000041 };
42 boot.kernel.sysctl."dev.i915.perf_stream_paranoid" = "0";
Skyler Grey944dfa22022-09-01 23:47:48 +010043 };
44}