I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
990 B

  1. # <<file-warning>>
  2. { config, pkgs, ... }:
  3. let
  4. # Keep garbage out of the home directory.
  5. mySteamDir = "$XDG_DATA_HOME/steam";
  6. # Custom shim for running steam.
  7. mySteam = writeScriptBin "steam" ''
  8. #!${stdenv.shell}
  9. HOME="${mySteamDir}" exec ${steam}/bin/steam "$@"
  10. '';
  11. # Run applications using the steam libraries.
  12. mySteamRun = writeScriptBin "steam-run" ''
  13. #!${stdenv.shell}
  14. HOME="${mySteamDir}" exec ${steam-run-native}/bin/steam-run "$@"
  15. '';
  16. in {
  17. # Install custom shims.
  18. environment.systemPackages = [
  19. mySteam
  20. mySteamRun
  21. ];
  22. # Create the steam directory.
  23. system.userActivationScripts.setupSteamDir = ''
  24. mkdir -p ${mySteamDir}
  25. '';
  26. # Required hardware configuration(s).
  27. hardware.opengl.enable = true;
  28. hardware.opengl.driSupport32Bit = true;
  29. hardware.pulseaudio.support32Bit = true;
  30. hardware.steam-hardware.enable = true;
  31. # Increase performance for proton games.
  32. systemd.extraConfig = "DefaultLimitNOFILE=1048576";
  33. }