nixvimConfig/modules/nixOS/bundles/gaming.nix

25 lines
704 B
Nix

{config, pkgs, lib, ...}:let
mainUser = config.myNixOS.sharedSettings.mainUser;
localCfg = config.myNixOS.bundles.gaming;
in {
options = {
myNixOS.bundles.gaming.remotePlay = lib.mkEnableOption {
default = true;
};
};
programs.steam = {
enable = true;
gamescopeSession.enable = true;
remotePlay.openFirewall = localCfg.remotePlay;
localNetworkGameTransfers.openFirewall = localCfg.remotePlay;
};
programs.gamemode.enable = true;
hardware.steam-hardware.enable = true;
environment.systemPackages = with pkgs; [protonup];
environment.sessionVariables = {
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${mainUser}/.steam/root/compatibilitytools.d";
};
}