24 lines
678 B
Nix
24 lines
678 B
Nix
{ lib, pkgs, config, ... }:
|
|
{
|
|
options.system.video.nvidia.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = "Enable the proprietary Nvidia stack";
|
|
};
|
|
|
|
config = lib.mkIf config.system.video.nvidia.enable {
|
|
hardware = {
|
|
nvidia = lib.mkIf config.system.video.nvidia.enable {
|
|
modesetting.enable = true;
|
|
nvidiaSettings = false;
|
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
|
open = false;
|
|
};
|
|
graphics.extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
|
};
|
|
|
|
boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
|
};
|
|
}
|