From dd1af84ca7c5bc2bd1043ef1f7d1e6860cf3217b Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Sat, 20 Jan 2024 22:23:17 -0600 Subject: [PATCH] Split Steam configs for profile separation --- config/system/amd-opengl.nix | 3 +++ config/system/amd-steam.nix | 11 +++++++++++ config/system/default.nix | 2 ++ config/system/intel-steam.nix | 15 +++++++++++++++ system.nix | 11 ++++------- 5 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 config/system/amd-steam.nix create mode 100644 config/system/intel-steam.nix diff --git a/config/system/amd-opengl.nix b/config/system/amd-opengl.nix index d68a5c1..8e8264b 100644 --- a/config/system/amd-opengl.nix +++ b/config/system/amd-opengl.nix @@ -6,5 +6,8 @@ lib.mkIf ("${deviceProfile}" == "amd-desktop") { enable = true; driSupport = true; driSupport32Bit = true; + ## amdvlk: an open-source Vulkan driver from AMD + extraPackages = [ pkgs.amdvlk ]; + extraPackages32 = [ pkgs.driversi686Linux.amdvlk ]; }; } diff --git a/config/system/amd-steam.nix b/config/system/amd-steam.nix new file mode 100644 index 0000000..19e604a --- /dev/null +++ b/config/system/amd-steam.nix @@ -0,0 +1,11 @@ +{ pkgs, config, ... }: + +lib.mkIf ("${deviceProfile}" == "amd-desktop") { + # Steam Configuration + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + package = pkgs.steam.override { withJava = true; }; + }; +} diff --git a/config/system/default.nix b/config/system/default.nix index a829897..7910202 100644 --- a/config/system/default.nix +++ b/config/system/default.nix @@ -3,9 +3,11 @@ { imports = [ ./amd-opengl.nix + ./amd-steam.nix ./autorun.nix ./boot.nix ./intel-opengl.nix + ./intel-steam.nix ./polkit.nix ./services.nix ]; diff --git a/config/system/intel-steam.nix b/config/system/intel-steam.nix new file mode 100644 index 0000000..43f6c35 --- /dev/null +++ b/config/system/intel-steam.nix @@ -0,0 +1,15 @@ +{ pkgs, config, ... }: + +lib.mkIf ("${deviceProfile}" == "intel-laptop") { + # Steam Configuration + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + package = pkgs.steam.override { + withPrimus = true; + withJava = true; + extraPkgs = pkgs: [ bumblebee glxinfo ]; + }; + }; +} diff --git a/system.nix b/system.nix index b6c9e92..7a780dd 100644 --- a/system.nix +++ b/system.nix @@ -51,17 +51,14 @@ noto-fonts-color-emoji material-icons brightnessctl ]; - # Steam Configuration - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - }; - programs.hyprland = { enable = true; package = inputs.hyprland.packages.${pkgs.system}.hyprland; }; + + programs.java.enable = true; + + programs.steam.gamescopeSession.enable = true; # Some programs need SUID wrappers, can be configured further or are # started in user sessions.