| { |
| pkgs, |
| username, |
| ... |
| }: { |
| config = { |
| programs.steam = { |
| enable = true; |
| remotePlay.openFirewall = true; |
| }; |
| hardware.steam-hardware.enable = true; |
| |
| internal.allowUnfree = ["steam" "steam-original" "steam-runtime"]; |
| environment = { |
| persistence."/large/persist".users.${username}.directories = [".local/share/Steam"]; |
| systemPackages = with pkgs; [gamescope gamemode /*( |
| writeTextDir "share/applications/steam.desktop" '' |
| [Desktop Entry] |
| Name=Steam |
| Comment=Application for managing and playing games on steam |
| Exec=${pkgs.gamescope}/bin/gamescope -w 1920 -h 1080 -- ${pkgs.steam}/bin/steam |
| Icon=steam |
| Terminal=false |
| Type=Application |
| Categories=Network;FileTransfer;Game; |
| MimeType=x-scheme-handler/steam;x-scheme-handler/steamlink; |
| Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends; |
| PrefersNonDefaultGPU=true |
| X-KDE-RunOnDiscreteGpu=true |
| '' |
| )*/]; |
| }; |
| boot.kernel.sysctl."dev.i915.perf_stream_paranoid" = "0"; |
| }; |
| } |