dotfiles/nix/system/drivers/shitvidia-patch.nix

44 lines
917 B
Nix
Raw Normal View History

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