70 lines
1.4 KiB
Nix
70 lines
1.4 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
options = {
|
|
apps.gaming = {
|
|
enable = lib.mkEnableOption "enable gaming";
|
|
steam.enable = lib.mkEnableOption "enable steam";
|
|
minecraft.enable = lib.mkEnableOption "enable minecraft";
|
|
};
|
|
};
|
|
|
|
config = {
|
|
environment.systemPackages =
|
|
with pkgs;
|
|
[ ]
|
|
++ (
|
|
if (config.apps.gaming.enable) then
|
|
[
|
|
cartridges
|
|
lutris
|
|
]
|
|
else
|
|
[ ]
|
|
)
|
|
++ (
|
|
if (config.apps.gaming.minecraft.enable) then
|
|
|
|
[ prismlauncher ]
|
|
else
|
|
[ ]
|
|
)
|
|
++ (
|
|
if (config.apps.gaming.steam.enable) then
|
|
|
|
[ adwsteamgtk ]
|
|
else
|
|
[ ]
|
|
);
|
|
programs = {
|
|
steam =
|
|
if config.apps.gaming.steam.enable then
|
|
{
|
|
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
|
|
];
|
|
}
|
|
else
|
|
{ };
|
|
gamescope = {
|
|
enable = true;
|
|
capSysNice = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
}
|