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

16 lines
420 B
Nix

{ pkgs, config, lib, ... }: {
options = {
drivers.nvidia.enable = lib.mkEnableOption "Enable proprietary Nvidia drivers";
};
config = lib.mkIf config.drivers.nvidia.enable {
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
nvidiaSettings = false;
package = config.boot.kernelPackages.nvidiaPackages.beta;
open = false;
};
};
}