42 lines
876 B
Nix
Executable file
42 lines
876 B
Nix
Executable file
{
|
|
pkgs,
|
|
config,
|
|
...
|
|
}:
|
|
|
|
let
|
|
# nvidia package to patch
|
|
package = config.boot.kernelPackages.nvidiaPackages.production;
|
|
in
|
|
|
|
{
|
|
hardware.graphics = {
|
|
enable = true;
|
|
enable32Bit = true;
|
|
};
|
|
|
|
# TODO fix hybrid optimus shit mode... add "intel" for inner display to work
|
|
services.xserver.videoDrivers = [
|
|
"nvidia"
|
|
];
|
|
|
|
#boot.initrd.kernelModules = [ "nvidia" ];
|
|
#boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
|
|
|
|
nixpkgs.config.cudaSupport = true;
|
|
hardware.nvidia = {
|
|
modesetting.enable = true;
|
|
prime = {
|
|
sync.enable = false;
|
|
nvidiaBusId = "PCI:1:0:0";
|
|
intelBusId = "PCI:0:2:0";
|
|
};
|
|
|
|
powerManagement.enable = false;
|
|
powerManagement.finegrained = false;
|
|
open = false;
|
|
nvidiaSettings = true;
|
|
package = pkgs.nvidia-patch.patch-nvenc (pkgs.nvidia-patch.patch-fbc package);
|
|
};
|
|
}
|