# RTX 3080 Ti with the open kernel module, as linux-cachyos-nvidia-open on # CachyOS. Turned off in the test VM (see vm.nix). { config, lib, pkgs, ... }: let cfg = config.dot.nvidia; in { options.dot.nvidia.enable = lib.mkEnableOption "the NVIDIA driver" // { default = true; }; config = lib.mkMerge [ { hardware.graphics = { enable = true; enable32Bit = true; }; } (lib.mkIf cfg.enable { services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia = { open = true; # 615.x, the same branch CachyOS has. package = config.boot.kernelPackages.nvidiaPackages.latest; modesetting.enable = true; nvidiaSettings = true; # Not set up on CachyOS either (no nvidia-suspend services enabled). powerManagement.enable = false; }; # libva-nvidia-driver: Firefox hardware video decoding (see the NVD_BACKEND # and LIBVA_DRIVER_NAME lines in hyprland.lua). hardware.graphics.extraPackages = [ pkgs.nvidia-vaapi-driver ]; }) ]; }