2024-08-27 17:56:04 +02:00
|
|
|
{config, pkgs, lib, ...}:let
|
2024-07-13 11:38:17 +02:00
|
|
|
mainUser = config.myNixOS.sharedSettings.mainUser;
|
2024-08-27 17:56:04 +02:00
|
|
|
localCfg = config.myNixOS.bundles.gaming;
|
2024-07-13 11:38:17 +02:00
|
|
|
in {
|
2024-08-27 17:56:04 +02:00
|
|
|
options = {
|
2024-10-13 13:58:00 +02:00
|
|
|
myNixOS.bundles.gaming = {
|
|
|
|
|
remotePlay = lib.mkEnableOption { default = true; };
|
|
|
|
|
alvr = lib.mkEnableOption { default = false; };
|
2024-08-27 17:56:04 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-13 11:38:17 +02:00
|
|
|
programs.steam = {
|
|
|
|
|
enable = true;
|
|
|
|
|
gamescopeSession.enable = true;
|
2024-08-27 17:56:04 +02:00
|
|
|
remotePlay.openFirewall = localCfg.remotePlay;
|
|
|
|
|
localNetworkGameTransfers.openFirewall = localCfg.remotePlay;
|
2024-07-13 11:38:17 +02:00
|
|
|
};
|
|
|
|
|
programs.gamemode.enable = true;
|
|
|
|
|
|
2024-08-27 17:56:04 +02:00
|
|
|
hardware.steam-hardware.enable = true;
|
|
|
|
|
|
2024-07-13 11:38:17 +02:00
|
|
|
environment.systemPackages = with pkgs; [protonup];
|
|
|
|
|
environment.sessionVariables = {
|
|
|
|
|
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${mainUser}/.steam/root/compatibilitytools.d";
|
|
|
|
|
};
|
2024-10-13 13:58:00 +02:00
|
|
|
|
|
|
|
|
programs.alvr = {
|
|
|
|
|
enable = localCfg.alvr;
|
|
|
|
|
openFirewall = localCfg.alvr;
|
|
|
|
|
};
|
2024-07-13 11:38:17 +02:00
|
|
|
}
|