modularizing kernel and loader settings

This commit is contained in:
cnst
2024-09-22 14:30:06 +02:00
parent 6f53da8393
commit 50d554b6f6
22 changed files with 294 additions and 84 deletions

View File

@@ -20,15 +20,7 @@ in {
vaapiVdpau
libvdpau-va-gl
amdvlk
# mesa
mesa
# vulkan
vulkan-tools
# vulkan-loader
# vulkan-validation-layers
# vulkan-extension-layer
];
extraPackages32 = with pkgs.pkgsi686Linux; [
vaapiVdpau

View File

@@ -18,9 +18,9 @@ in {
modules.hardware.graphics.nvidia = {
enable = mkEnableOption "Enables NVidia graphics";
package = mkOption {
type = types.enum ["stable" "beta" "production"]; # Added "production" here
type = types.enum ["stable" "beta" "production" "latest"];
default = "stable";
description = "Choose between the stable, beta, or production NVidia driver package";
description = "Choose between the stable, beta, latest, or production NVidia driver package";
};
};
};
@@ -49,15 +49,17 @@ in {
package =
if cfg.package == "beta"
then config.boot.kernelPackages.nvidiaPackages.beta
else if cfg.package == "latest"
then config.boot.kernelPackages.nvidiaPackages.latest
else if cfg.package == "production"
then config.boot.kernelPackages.nvidiaPackages.production
then config.boot.kernelPackages.nvidiaPackages.prodution
else config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
powerManagement = {
enable = false;
finegrained = false;
};
open = false;
open = true;
nvidiaSettings = true;
};
};