flake/common/gaming.nix
2024-01-09 14:33:28 -06:00

30 lines
925 B
Nix

{ config, pkgs, ... }:
{
# Enable GE-Proton (GloriousEggroll)
environment.sessionVariables = rec {
XDG_CACHE_HOME = "\${HOME}/.cache";
XDG_CONFIG_HOME = "\${HOME}/.config";
XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_DATA_HOME = "\${HOME}/.local/share";
# Steam needs this to find Proton-GE
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
# note: this doesn't replace PATH, it just adds this to it
PATH = [
"\${XDG_BIN_HOME}"
];
};
# Enable Gamemode
programs.gamemode.enable = true;
# TODO Enable Gamescope
programs.steam.gamescopeSession.enable = true;
# Enable Steam
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
}