Update to 24.11

This commit is contained in:
Jimbo 2024-11-19 13:20:34 -05:00
parent 79310cc53a
commit 81baaf8391
17 changed files with 94 additions and 80 deletions

View file

@ -1,30 +1,14 @@
{ lib, pkgs, config, ... }:
{
options.system.video = {
nvidia = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable the proprietary Nvidia stack";
};
};
nouveau = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable the open-source Nouveau driver";
};
options.system.video.nvidia = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable the proprietary Nvidia stack";
};
};
config = {
# Conditionally set video drivers based on the options
services.xserver.videoDrivers =
if config.system.video.nvidia.enable then [ "nvidia" ]
else if config.system.video.nouveau.enable then [ "nouveau" ]
else [];
# Configure Nvidia settings if Nvidia is enabled
config = lib.mkIf config.system.video.nvidia.enable {
hardware = {
nvidia = lib.mkIf config.system.video.nvidia.enable {
modesetting.enable = true;
@ -32,7 +16,10 @@
package = config.boot.kernelPackages.nvidiaPackages.beta;
open = false;
};
opengl.extraPackages = with pkgs; [ nvidia-vaapi-driver ];
graphics.extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
services.xserver.videoDrivers = [ "nvidia" ];
};
}