From 7827a866b9109410955673d2e9fe0ffb3c6f7a87 Mon Sep 17 00:00:00 2001 From: cswimr Date: Mon, 23 Dec 2024 11:28:09 -0500 Subject: [PATCH] add gamemode configuration and cleanup the gaming config a bit --- nixos/configuration.nix | 1 + nixos/gaming.nix | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index ed77261..223f505 100755 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -111,6 +111,7 @@ "networkmanager" "wheel" "docker" + "gamemode" ]; openssh = { authorizedKeys.keys = [ diff --git a/nixos/gaming.nix b/nixos/gaming.nix index d0df9ce..df91194 100644 --- a/nixos/gaming.nix +++ b/nixos/gaming.nix @@ -2,11 +2,35 @@ { programs.steam = { enable = true; + protontricks.enable = true; remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server }; + programs.gamemode = { + enable = true; + enableRenice = true; + settings = { + general = { + renice = 10; + inhibit_screensaver = 1; + }; + filter = { + # whitelist = '' + # RiseOfTheTombRaider + # ''; + + # blacklist = '' + # HalfLife3 + # glxgears + # ''; + }; + custom = { + start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; + end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; + }; + }; + }; environment.systemPackages = with pkgs; [ - gamemode (prismlauncher.override { jdks = with pkgs; [ jdk8 @@ -17,7 +41,6 @@ lunar-client heroic protonup-qt - protontricks winetricks celeste64 ];