complete restructure
This commit is contained in:
8
modules/gaming/default.nix
Normal file
8
modules/gaming/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
# modules/gaming/default.nix
|
||||
{
|
||||
imports = [
|
||||
./steam.nix
|
||||
./gamemode.nix
|
||||
./wine.nix
|
||||
];
|
||||
}
|
||||
38
modules/gaming/gamemode.nix
Normal file
38
modules/gaming/gamemode.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
# modules/gaming/gamemode.nix
|
||||
# Gaming performance optimizations
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
enableRenice = true;
|
||||
settings = {
|
||||
general = {
|
||||
renice = 10;
|
||||
softrealtime = "auto";
|
||||
inhibit_screensaver = 1;
|
||||
};
|
||||
gpu = {
|
||||
apply_gpu_optimisations = "accept-responsibility";
|
||||
gpu_device = 0;
|
||||
amd_performance_level = "high";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
"fs.inotify.max_user_watches" = 524288;
|
||||
"vm.swappiness" = 10;
|
||||
"vm.vfs_cache_pressure" = 50;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gamemode
|
||||
gamescope
|
||||
];
|
||||
}
|
||||
23
modules/gaming/steam.nix
Normal file
23
modules/gaming/steam.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
# modules/gaming/steam.nix
|
||||
# Steam and Proton configuration
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
|
||||
extraCompatPackages = with pkgs; [
|
||||
proton-ge-bin
|
||||
];
|
||||
};
|
||||
|
||||
hardware.steam-hardware.enable = true;
|
||||
}
|
||||
23
modules/gaming/wine.nix
Normal file
23
modules/gaming/wine.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
# modules/gaming/wine.nix
|
||||
# Wine, launchers, and controller support
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
wineWowPackages.stagingFull
|
||||
winetricks
|
||||
protontricks
|
||||
faugus-launcher
|
||||
lutris
|
||||
heroic
|
||||
];
|
||||
|
||||
services.udev.packages = with pkgs; [
|
||||
game-devices-udev-rules
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user