update packages + some tweaks

This commit is contained in:
Reid 2026-04-18 18:41:55 -07:00
parent 527378ad95
commit edfb60dd12
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
26 changed files with 304 additions and 319 deletions

View file

@ -6,40 +6,48 @@ 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";
session = mkEnableOption "Enable a Steam Deck-like session powered by gamescope";
};
config = mkIf cfg.enable {
programs.steam = {
enable = true;
gamescopeSession.enable = cfg.session;
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
extraPkgs = (pkgs: with pkgs; [
libXcursor
libXi
libXinerama
libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
]));
gperftools
]);
extraEnv = {
# https://github.com/gloriouseggroll/proton-ge-custom
PROTON_USE_WAYLAND = "1";
PROTON_USE_WOW64 = "1";
};
};
extraCompatPackages = with pkgs; [ proton-ge-bin ];
protontricks.enable = true;
# explicitly allow all the ports to open up
localNetworkGameTransfers.openFirewall = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
programs.gamescope = {
enable = cfg.useGamescope;
# capSysNice = true; https://github.com/NixOS/nixpkgs/issues/351516
};
# enable windows NT sync primitive driver (semaphores, mutexes, etc.)
# improves performance on wine 11+ and proton 11+
boot.kernelModules = [ "ntsync" ];
user.packages = with pkgs; [ steam-run ];
};