diff --git a/config/system/amd-opengl.nix b/config/system/amd-opengl.nix index 8e8264b..93f8278 100644 --- a/config/system/amd-opengl.nix +++ b/config/system/amd-opengl.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, deviceProfile, ... }: +{ pkgs, config, lib, gpuType, ... }: -lib.mkIf ("${deviceProfile}" == "amd-desktop") { +lib.mkIf ("${gpuType}" == "amd") { # OpenGL hardware.opengl = { enable = true; diff --git a/config/system/amd-steam.nix b/config/system/amd-steam.nix deleted file mode 100644 index 35d6db6..0000000 --- a/config/system/amd-steam.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ pkgs, config, lib, deviceProfile, ... }: - -lib.mkIf ("${deviceProfile}" == "amd-desktop") { - # Steam Configuration - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - }; -} diff --git a/config/system/default.nix b/config/system/default.nix index c45fc4e..520ef69 100644 --- a/config/system/default.nix +++ b/config/system/default.nix @@ -3,12 +3,11 @@ { imports = [ ./amd-opengl.nix - ./amd-steam.nix + ./steam.nix ./autorun.nix ./boot.nix ./displaymanager.nix ./intel-opengl.nix - ./intel-steam.nix ./packages.nix ./polkit.nix ./services.nix diff --git a/config/system/intel-steam.nix b/config/system/intel-steam.nix deleted file mode 100644 index e26bb3b..0000000 --- a/config/system/intel-steam.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ pkgs, config, lib, deviceProfile, ... }: - -lib.mkIf ("${deviceProfile}" == "intel-laptop") { - # Steam Configuration - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - package = pkgs.steam.override { - withPrimus = true; - extraPkgs = pkgs: [ pkgs.bumblebee pkgs.glxinfo ]; - }; - }; -} diff --git a/config/system/steam.nix b/config/system/steam.nix new file mode 100644 index 0000000..734f290 --- /dev/null +++ b/config/system/steam.nix @@ -0,0 +1,16 @@ +{ pkgs, config, lib, cpuType, ... }: + +{ + # Steam Configuration + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + package = lib.mkIf ("${cpuType}" == "intel") { + pkgs.steam.override { + withPrimus = true; + extraPkgs = pkgs: [ pkgs.bumblebee pkgs.glxinfo ]; + }; + }; + }; +} diff --git a/flake.nix b/flake.nix index 1abb499..a913da9 100644 --- a/flake.nix +++ b/flake.nix @@ -31,9 +31,10 @@ wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git"; wallpaperDir = "/home/${username}/Pictures/Wallpapers"; flakeDir = "/home/${username}/zaneyos"; - # Configuration option profile - # default options amd-desktop, intel-laptop, vm (WIP) - deviceProfile = "amd-desktop"; + # Driver selection profile + # default options amd, intel, nvidia, vm (WIP) + cpuType = "amd"; + gpuType = "amd"; pkgs = import nixpkgs { inherit system; @@ -50,8 +51,8 @@ inherit gitUsername; inherit theTimezone; inherit gitEmail; inherit theLocale; inherit wallpaperDir; inherit wallpaperGit; - inherit deviceProfile; inherit theKBDLayout; - inherit theLCVariables; + inherit cpuType; inherit theKBDLayout; + inherit theLCVariables; inherit gpuType; }; modules = [ ./system.nix home-manager.nixosModules.home-manager {