steam update

This commit is contained in:
Reid 2025-03-07 14:43:11 -08:00
parent 89ca66250c
commit d2cc424e98
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
2 changed files with 34 additions and 2 deletions

View file

@ -6,10 +6,41 @@ let
in {
options.modules.software.distractions.steam = {
enable = mkEnableOption "Enable Steam, the game distribution software";
useGamescope = mkEnableOption "Enable Gamescope, a tool to run games in a separate X session";
};
config = mkIf cfg.enable {
programs.steam.enable = true;
programs.steam.protontricks.enable = true;
programs.steam = {
enable = true;
package = pkgs.steam.override {
# required for programs to run sometimes
# see: https://github.com/NixOS/nixpkgs/issues/162562#issuecomment-1229444338
extraPkgs = (pkgs: (lib.optional cfg.useGamescope pkgs.gamescope) ++ (with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
]));
};
extraCompatPackages = with pkgs; [ proton-ge-bin ];
protontricks.enable = true;
localNetworkGameTransfers.openFirewall = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
programs.gamescope = {
enable = true;
# capSysNice = true; https://github.com/NixOS/nixpkgs/issues/351516
};
user.packages = with pkgs; [ steam-run ];
};
}