cleaned up nvidia code
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
amd.enable = false;
|
||||
nvidia = {
|
||||
enable = true;
|
||||
package = "stable"; # set to stable or beta depending on preference
|
||||
package = "production"; # set to beta/stable/production depending on preference
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -24,9 +24,9 @@ in {
|
||||
modules.hardware.graphics.nvidia = {
|
||||
enable = mkEnableOption "Enables NVidia graphics";
|
||||
package = mkOption {
|
||||
type = types.enum ["stable" "beta"];
|
||||
type = types.enum ["stable" "beta" "production"]; # Added "production" here
|
||||
default = "stable";
|
||||
description = "Choose between the stable or beta NVidia driver package";
|
||||
description = "Choose between the stable, beta, or production NVidia driver package";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -54,7 +54,9 @@ in {
|
||||
package =
|
||||
if cfg.package == "beta"
|
||||
then config.boot.kernelPackages.nvidiaPackages.beta
|
||||
else config.boot.kernelPackages.nvidiaPackages.production;
|
||||
else if cfg.package == "production"
|
||||
then config.boot.kernelPackages.nvidiaPackages.production
|
||||
else config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
modesetting.enable = true;
|
||||
powerManagement = {
|
||||
enable = false;
|
||||
|
||||
Reference in New Issue
Block a user