mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-03 16:57:14 +08:00
The common/pc/laptop/ssd folder was apparently moved a level up and was replaced by a symlink to keep things working. We can consolidate this now.
33 lines
855 B
Nix
33 lines
855 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: {
|
|
imports = [
|
|
../../../../common/cpu/amd
|
|
../../../../common/cpu/amd/pstate.nix
|
|
../../../../common/gpu/nvidia/prime.nix # prime offload
|
|
../../../../common/gpu/nvidia/ampere # use open drivers
|
|
../../../../common/pc/laptop
|
|
../../../../common/pc/ssd
|
|
];
|
|
|
|
boot.kernelModules = ["amdgpu"];
|
|
services.xserver.videoDrivers = ["nvidia"];
|
|
|
|
hardware = {
|
|
amdgpu.initrd.enable = false;
|
|
|
|
nvidia = {
|
|
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
|
modesetting.enable = lib.mkDefault true;
|
|
powerManagement.enable = lib.mkDefault true;
|
|
powerManagement.finegrained = lib.mkDefault true;
|
|
prime = {
|
|
amdgpuBusId = lib.mkDefault "PCI:52:0:0"; # Hexadecimal 34:00.0
|
|
nvidiaBusId = lib.mkDefault "PCI:1:0:0"; # Hexadecimal 01:00.0
|
|
};
|
|
};
|
|
};
|
|
}
|