NixOS-Config/modules/system/devices/video/nvidia/default.nix

23 lines
621 B
Nix
Raw Normal View History

{ lib, pkgs, config, ... }:
2024-10-09 03:36:08 -04:00
{
options.system.video.nvidia.enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
2024-11-19 13:20:34 -05:00
config = lib.mkIf config.system.video.nvidia.enable {
2024-11-18 17:14:02 -05:00
hardware = {
nvidia = lib.mkIf config.system.video.nvidia.enable {
modesetting.enable = true;
nvidiaSettings = false;
package = config.boot.kernelPackages.nvidiaPackages.beta;
open = false;
};
2024-11-19 13:20:34 -05:00
graphics.extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
2024-11-19 13:20:34 -05:00
boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
services.xserver.videoDrivers = [ "nvidia" ];
2024-10-09 03:36:08 -04:00
};
}