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.

38 lines
966 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 = pkgs.writeScriptBin "steam" ''
  8. HOME="${mySteamDir}" exec ${pkgs.steam}/bin/steam "$@"
  9. '';
  10. # Run applications using the steam libraries.
  11. mySteamRun = pkgs.writeScriptBin "steam-run" ''
  12. HOME="${mySteamDir}" exec ${pkgs.steam-run-native}/bin/steam-run "$@"
  13. '';
  14. in {
  15. # Install custom shims.
  16. environment.systemPackages = [
  17. mySteam
  18. mySteamRun
  19. ];
  20. # Create the steam directory.
  21. system.userActivationScripts.setupSteamDir = ''
  22. mkdir -p ${mySteamDir}
  23. '';
  24. # Required hardware configuration(s).
  25. hardware.opengl.enable = true;
  26. hardware.opengl.driSupport32Bit = true;
  27. hardware.pulseaudio.support32Bit = true;
  28. hardware.steam-hardware.enable = true;
  29. # Increase performance for proton games.
  30. systemd.extraConfig = "DefaultLimitNOFILE=1048576";
  31. }