From 65cc86d86a2a9d5d76b1b3febd2bb77237a0d370 Mon Sep 17 00:00:00 2001 From: iFargle Date: Sun, 7 Jan 2024 18:50:15 +0900 Subject: [PATCH] Add gamemdoe --- nixos/hosts/nixos-desktop/default.nix | 19 +++++++++++++++++++ nixos/hosts/nixos-framework/default.nix | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) 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