config.nix/modules/apps/gaming/default.nix

46 lines
1.1 KiB
Nix

{
config,
lib,
pkgs,
...
}:
{
options = {
apps.gaming = {
enable = true;
steam.enable = lib.mkEnableOption "enable steam";
minecraft.enable = lib.mkEnableOption "enable minecraft";
};
};
config = {
environment.systemPackages = with pkgs; [
(lib.mkIf (config.apps.gaming.enable) cartridges)
(lib.mkIf (config.apps.gaming.enable) lutris)
(lib.mkIf (config.apps.gaming.minecraft.enable) prismlauncher)
(lib.mkIf (config.apps.gaming.steam.enable) adwsteamgtk)
];
programs = {
steam = lib.mkIf config.apps.gaming.steam.enable {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
gamescopeSession.enable = true;
protontricks.enable = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
extraPackages = with pkgs; [
gamescope
];
};
gamescope = {
enable = true;
capSysNice = true;
};
};
};
}