Files
nixos/hosts/tuxcomp/gaming.nix
T
2026-10-07 00:23:09 +02:00

66 lines
1.6 KiB
Nix

{ pkgs, ... }:
{
programs.gamemode.enable = true;
users.users.djai.extraGroups = [ "gamemode" ];
# capSysNice would make glibc strip LD_PRELOAD from gamescope, breaking steam's overlay.
# '--rt' works through the rtprio limit below instead (see the gamescope patch on tuxcomp).
programs.gamescope = {
enable = true;
capSysNice = false;
};
security.pam.loginLimits = [
{
domain = "@users";
type = "-";
item = "rtprio";
value = "99";
}
{
domain = "@users";
type = "-";
item = "nice";
value = "-19";
}
];
# Wine 10+ uses the kernel's ntsync when /dev/ntsync exists; far cheaper
# than esync/fsync under thread contention.
boot.kernelModules = [ "ntsync" ];
users.users.djai.packages = with pkgs; [
desmume
eden
libretro.citra
steam
steamguard-cli
winetricks
wineWow64Packages.stable
];
services.flatpak.packages = [
"org.vinegarhq.Sober"
];
home-manager.users.djai.programs.prismlauncher = {
enable = true;
settings = {
ApplicationTheme = "system";
Env = ''{\"__GLX_VENDOR_LIBRARY_NAME\":\"nvidia\",\"__NV_PRIME_RENDER_OFFLOAD\":\"1\",\"__VK_LAYER_NV_optimus\":\"NVIDIA_only\"}'';
IconTheme = "pe_colored";
JavaPath = "java"; # TODO: check correct
Language = "en_GB";
MaxMemAlloc = 8192;
MinMemAlloc = 512;
ShowConsole = false;
ShowConsoleOnError = true;
ShowGameTime = true;
ShowGameTimeWithoutDays = true;
UseDiscreteGpu = true;
UserAskedAboutAutomaticJavaDownload = true;
};
};
}