diff --git a/common/gpu/nvidia/ada-lovelace/default.nix b/common/gpu/nvidia/ada-lovelace/default.nix new file mode 100644 index 000000000..67b1b123f --- /dev/null +++ b/common/gpu/nvidia/ada-lovelace/default.nix @@ -0,0 +1,10 @@ +{lib, config, ...}: +let + nividiaPackage = config.hardware.nvidia.package; +in +{ + imports = [ ../. ]; + + # enable the open source drivers if the package supports it + hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); +} diff --git a/common/gpu/nvidia/ampere/default.nix b/common/gpu/nvidia/ampere/default.nix new file mode 100644 index 000000000..67b1b123f --- /dev/null +++ b/common/gpu/nvidia/ampere/default.nix @@ -0,0 +1,10 @@ +{lib, config, ...}: +let + nividiaPackage = config.hardware.nvidia.package; +in +{ + imports = [ ../. ]; + + # enable the open source drivers if the package supports it + hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); +} diff --git a/common/gpu/nvidia/maxwell/default.nix b/common/gpu/nvidia/maxwell/default.nix new file mode 100644 index 000000000..89565090f --- /dev/null +++ b/common/gpu/nvidia/maxwell/default.nix @@ -0,0 +1,7 @@ +{lib, ...}: +{ + imports = [ ../. ]; + + # The open source driver does not support Maxwell GPUs. + hardware.nvidia.open = false; +} diff --git a/common/gpu/nvidia/pascal/default.nix b/common/gpu/nvidia/pascal/default.nix new file mode 100644 index 000000000..ad3555dc1 --- /dev/null +++ b/common/gpu/nvidia/pascal/default.nix @@ -0,0 +1,7 @@ +{lib, ...}: +{ + imports = [ ../. ]; + + # The open source driver does not support Pascal GPUs. + hardware.nvidia.open = false; +} diff --git a/common/gpu/nvidia/turing/default.nix b/common/gpu/nvidia/turing/default.nix new file mode 100644 index 000000000..67b1b123f --- /dev/null +++ b/common/gpu/nvidia/turing/default.nix @@ -0,0 +1,10 @@ +{lib, config, ...}: +let + nividiaPackage = config.hardware.nvidia.package; +in +{ + imports = [ ../. ]; + + # enable the open source drivers if the package supports it + hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); +} diff --git a/dell/xps/15-7590/nvidia/default.nix b/dell/xps/15-7590/nvidia/default.nix index a4130e857..78da989df 100644 --- a/dell/xps/15-7590/nvidia/default.nix +++ b/dell/xps/15-7590/nvidia/default.nix @@ -3,13 +3,14 @@ imports = [ ../. ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/turing ]; hardware.nvidia = { powerManagement = { # Enable NVIDIA power management. enable = lib.mkDefault true; - + # Enable dynamic power management. finegrained = lib.mkDefault true; }; diff --git a/dell/xps/15-9570/nvidia/default.nix b/dell/xps/15-9570/nvidia/default.nix index e58fa5819..430e0e90c 100644 --- a/dell/xps/15-9570/nvidia/default.nix +++ b/dell/xps/15-9570/nvidia/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../../common/cpu/intel ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/pascal ../../../../common/pc/laptop ../xps-common.nix ];