mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 23:00:39 +02:00
feat: enable nvidia on laptop
This commit is contained in:
parent
a627d0c61e
commit
859e3d1771
1 changed files with 32 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
|
@ -12,6 +13,7 @@
|
|||
|
||||
../../config/hardware/intel.nix
|
||||
../../config/hardware/physical.nix
|
||||
../../config/hardware/bluetooth.nix
|
||||
|
||||
../../config/dev
|
||||
../../config/graphical
|
||||
|
@ -35,5 +37,35 @@
|
|||
packages = [pkgs.terminus_font];
|
||||
};
|
||||
|
||||
# FIXME: fuck optional modules and make this more adjustable via settings
|
||||
graphical.gaming.enable = true;
|
||||
boot.blacklistedKernelModules = ["nouveau"];
|
||||
services.xserver.videoDrivers = lib.mkForce ["nvidia"];
|
||||
|
||||
hardware = {
|
||||
nvidia = {
|
||||
prime = {
|
||||
offload.enable = true;
|
||||
offload.enableOffloadCmd = true;
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
modesetting.enable = true;
|
||||
nvidiaPersistenced = true;
|
||||
nvidiaSettings = true;
|
||||
open = false;
|
||||
powerManagement.enable = false;
|
||||
};
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
topology.self.icon = "devices.laptop";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue