From 75295e2f46c39179cb60e1c86e69407b224d045b Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Thu, 6 Feb 2025 23:05:41 +0100 Subject: [PATCH] Configure gamemode for more performance. --- modules/nixos/gaming.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/nixos/gaming.nix b/modules/nixos/gaming.nix index bdb67c4..c370fa2 100644 --- a/modules/nixos/gaming.nix +++ b/modules/nixos/gaming.nix @@ -1,5 +1,6 @@ { config, + pkgs, lib, ... }: { @@ -13,7 +14,20 @@ # Enable gamescope programs.steam.gamescopeSession.enable = true; # Install gamemode - programs.gamemode.enable = true; + programs.gamemode = { + enable = true; + enableRenice = true; + settings = { + general = { + softrealtime = "on"; + renice = 10; + }; + custom = { + start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; + end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; + }; + }; + }; # Setup esync systemd.extraConfig = "DefaultLimitNOFILE=1048576"; security.pam.loginLimits = [