{ pkgs, lib, config, hwconfig, unstable-pkgs, ... }: let cfg = config.kk.steam; in { options.kk.steam = { enable = lib.mkEnableOption "Enable steam"; }; config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ unzip wget xdotool xorg.xprop xorg.xrandr unixtools.xxd xorg.xwininfo yad protonup-qt protontricks bottles ]; programs.steam = { enable = true; #!hwconfig.useImpermanence; remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers package = pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ xorg.libXcursor xorg.libXi xorg.libXinerama xorg.libXScrnSaver libpng libpulseaudio libvorbis sdl3 SDL2 stdenv.cc.cc.lib libkrb5 keyutils gamescope ]; }; }; programs.gamemode.enable = true; }; }