From 8f5a19a7af5c31f44b58843ac571150a5bb8cf67 Mon Sep 17 00:00:00 2001 From: cnst Date: Sun, 30 Jun 2024 08:34:27 +0200 Subject: [PATCH] gamescope try again --- hosts/cnix/default.nix | 2 ++ hosts/extra/gamemode/default.nix | 19 +++++++++++++++++++ hosts/extra/gamescope/default.nix | 5 +++++ hosts/extra/steam/default.nix | 19 +------------------ 4 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 hosts/extra/gamemode/default.nix create mode 100644 hosts/extra/gamescope/default.nix diff --git a/hosts/cnix/default.nix b/hosts/cnix/default.nix index 38688f6a..84ab6c86 100644 --- a/hosts/cnix/default.nix +++ b/hosts/cnix/default.nix @@ -32,6 +32,8 @@ in { ../core ../extra/steam ../extra/nix-ld + ../extra/gamescope + ../extra/gamemode ../services/cnix.nix ../hardware/cnix.nix ../locale/cnix.nix diff --git a/hosts/extra/gamemode/default.nix b/hosts/extra/gamemode/default.nix new file mode 100644 index 00000000..d684e867 --- /dev/null +++ b/hosts/extra/gamemode/default.nix @@ -0,0 +1,19 @@ +{pkgs, ...}: { + programs.gamemode = { + enable = true; + settings = { + general = { + renice = 10; + }; + gpu = { + apply_gpu_optimisations = "accept-responsibility"; + gpu_device = 1; + amd_performance_level = "high"; + }; + custom = { + start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; + end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; + }; + }; + }; +} diff --git a/hosts/extra/gamescope/default.nix b/hosts/extra/gamescope/default.nix new file mode 100644 index 00000000..1dd167e7 --- /dev/null +++ b/hosts/extra/gamescope/default.nix @@ -0,0 +1,5 @@ +{ + programs.gamescope = { + enable = true; + }; +} diff --git a/hosts/extra/steam/default.nix b/hosts/extra/steam/default.nix index 96cf7d3a..42946f13 100644 --- a/hosts/extra/steam/default.nix +++ b/hosts/extra/steam/default.nix @@ -1,4 +1,5 @@ {pkgs, ...}: { + environment.variables.AMD_VULKAN_ICD = "RADV"; programs = { steam = { enable = true; @@ -24,23 +25,5 @@ ]; }; }; - gamemode = { - enable = true; - settings = { - general = { - renice = 10; - }; - gpu = { - apply_gpu_optimisations = "accept-responsibility"; - gpu_device = 1; - amd_performance_level = "high"; - }; - custom = { - start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; - end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; - }; - }; - }; }; - environment.variables.AMD_VULKAN_ICD = "RADV"; }