Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 1 | { pkgs |
| 2 | , username |
Skyler Grey | 632d68a | 2023-02-21 10:26:28 +0000 | [diff] [blame] | 3 | , config |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 4 | , ... |
Skyler Grey | 1010db9 | 2022-09-05 03:21:48 +0100 | [diff] [blame] | 5 | }: { |
Skyler Grey | 944dfa2 | 2022-09-01 23:47:48 +0100 | [diff] [blame] | 6 | config = { |
| 7 | programs.steam = { |
| 8 | enable = true; |
| 9 | remotePlay.openFirewall = true; |
Skyler Grey | 632d68a | 2023-02-21 10:26:28 +0000 | [diff] [blame] | 10 | |
| 11 | package = pkgs.steam.override |
| 12 | { |
| 13 | extraLibraries = pkgs: with config.hardware.opengl; [ package ] ++ extraPackages; |
| 14 | }; |
Skyler Grey | 944dfa2 | 2022-09-01 23:47:48 +0100 | [diff] [blame] | 15 | }; |
| 16 | hardware.steam-hardware.enable = true; |
| 17 | |
Skyler Grey | c44e39a | 2022-10-31 00:32:26 +0000 | [diff] [blame] | 18 | internal.allowUnfree = [ "steam" "steam-original" "steam-runtime" "steam-run" ]; |
Skyler Grey | 7c61e7a | 2022-10-31 00:22:11 +0000 | [diff] [blame] | 19 | environment = { |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 20 | persistence."/large/persist".users.${username}.directories = [ ".local/share/Steam" ]; |
| 21 | systemPackages = with pkgs; [ |
Skyler Grey | 1118d5a | 2023-02-26 12:46:15 +0000 | [diff] [blame] | 22 | proton-caller |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 23 | gamescope |
Skyler Grey | c44e39a | 2022-10-31 00:32:26 +0000 | [diff] [blame] | 24 | gamemode |
| 25 | sfs-select /*( |
Skyler Grey | 7c61e7a | 2022-10-31 00:22:11 +0000 | [diff] [blame] | 26 | writeTextDir "share/applications/steam.desktop" '' |
| 27 | [Desktop Entry] |
| 28 | Name=Steam |
| 29 | Comment=Application for managing and playing games on steam |
| 30 | Exec=${pkgs.gamescope}/bin/gamescope -w 1920 -h 1080 -- ${pkgs.steam}/bin/steam |
| 31 | Icon=steam |
| 32 | Terminal=false |
| 33 | Type=Application |
| 34 | Categories=Network;FileTransfer;Game; |
| 35 | MimeType=x-scheme-handler/steam;x-scheme-handler/steamlink; |
| 36 | Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends; |
| 37 | PrefersNonDefaultGPU=true |
| 38 | X-KDE-RunOnDiscreteGpu=true |
| 39 | '' |
Skyler Grey | 632d68a | 2023-02-21 10:26:28 +0000 | [diff] [blame] | 40 | )*/ |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 41 | ]; |
Skyler Grey | 7c61e7a | 2022-10-31 00:22:11 +0000 | [diff] [blame] | 42 | }; |
| 43 | boot.kernel.sysctl."dev.i915.perf_stream_paranoid" = "0"; |
Skyler Grey | 944dfa2 | 2022-09-01 23:47:48 +0100 | [diff] [blame] | 44 | }; |
| 45 | } |