nixos-conf/shared/hardware/nvidia.nix

23 lines
612 B
Nix

{ pkgs, ... }:
{
hardware = {
nvidia = {
open = true; # Set to false to use the proprietary kernel module
forceFullCompositionPipeline = true;
};
graphics = {
enable = true;
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
};
services.xserver.videoDrivers = [ "nvidia" ];
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
nixpkgs.config.cudaSupport = true;
nix.settings = {
substituters = [ "https://nix-community.cachix.org" ];
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
};
}