mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-12-23 10:09:44 +01:00
Add specialisation for “DDG" mode is enabled
This commit is contained in:
parent
dea6ef85a1
commit
b53fc0a785
1 changed files with 24 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -10,17 +10,29 @@
|
||||||
./edid
|
./edid
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.amdgpu.loadInInitrd = lib.mkDefault false;
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
hardware.amdgpu.loadInInitrd = lib.mkDefault false;
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = lib.mkDefault true;
|
modesetting.enable = lib.mkDefault true;
|
||||||
powerManagement.enable = lib.mkDefault true;
|
powerManagement.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
prime = {
|
services.thermald.enable = lib.mkDefault true;
|
||||||
amdgpuBusId = "PCI:6:0:0";
|
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.thermald.enable = lib.mkDefault true;
|
specialisation.ddg.configuration = {
|
||||||
|
# This specialisation is for the case where "DDG" (A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration.
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ];
|
||||||
|
hardware.nvidia.prime.offload.enable = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
(lib.mkIf (config.specialisation != {}) {
|
||||||
|
hardware.nvidia.prime = {
|
||||||
|
amdgpuBusId = "PCI:6:0:0";
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
Loading…
Reference in a new issue