diff --git a/nixos/hosts/nixos-desktop/default.nix b/nixos/hosts/nixos-desktop/default.nix index 817e2585..4ae47384 100644 --- a/nixos/hosts/nixos-desktop/default.nix +++ b/nixos/hosts/nixos-desktop/default.nix @@ -25,6 +25,25 @@ # Set the networking hostname: networking.hostName = "nixos-desktop"; + + programs.gamemode = { + enable = true; + enableRenice = true; + settings = { + general = { + renice = 10; + }; + # Warning: GPU optimisations have the potential to damage hardware + gpu = { + # apply_gpu_optimisations = "accept-responsibility"; + gpu_device = 0; + amd_performance_level = "high"; + }; + custom = { + start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; + end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; + }; + }; hardware = { opengl = { diff --git a/nixos/hosts/nixos-framework/default.nix b/nixos/hosts/nixos-framework/default.nix index 44bc60b5..19beb9de 100644 --- a/nixos/hosts/nixos-framework/default.nix +++ b/nixos/hosts/nixos-framework/default.nix @@ -43,6 +43,25 @@ }; }; + programs.gamemode = { + enable = true; + enableRenice = true; + settings = { + general = { + renice = 10; + }; + # Warning: GPU optimisations have the potential to damage hardware + gpu = { + # apply_gpu_optimisations = "accept-responsibility"; + gpu_device = 0; + amd_performance_level = "high"; + }; + custom = { + start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; + end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; + }; + }; + environment.systemPackages = with pkgs; [ distrobox # Game related things