feat: add intel graphics config
This commit is contained in:
27
host/modules/gpu/nvidia.nix
Normal file
27
host/modules/gpu/nvidia.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [nvidia-vaapi-driver intel-media-driver];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [nvidia-vaapi-driver intel-media-driver];
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
finegrained = false;
|
||||
};
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
|
||||
prime = lib.optionalAttrs config.host.laptop {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user