2024-06-26 08:54:34 +02:00
|
|
|
{ config, lib, ... }:
|
2021-03-23 19:34:15 +01:00
|
|
|
|
|
|
|
{
|
2023-10-10 22:23:31 +02:00
|
|
|
options.hardware.amdgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc
|
2022-12-15 22:01:50 +01:00
|
|
|
"loading `amdgpu` kernelModule at stage 1. (Add `amdgpu` to `boot.initrd.kernelModules`)"
|
|
|
|
) // {
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
2024-06-21 23:26:44 +02:00
|
|
|
imports = [ ../24.05-compat.nix ];
|
2022-12-15 22:01:50 +01:00
|
|
|
config = lib.mkMerge [
|
|
|
|
{
|
2023-03-06 10:08:52 +01:00
|
|
|
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
|
2023-01-28 16:46:56 +01:00
|
|
|
|
2024-06-21 15:44:42 +02:00
|
|
|
hardware.graphics = {
|
|
|
|
enable = lib.mkDefault true;
|
|
|
|
enable32Bit = lib.mkDefault true;
|
2023-01-28 16:46:56 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
(lib.mkIf config.hardware.amdgpu.loadInInitrd {
|
|
|
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
|
|
})
|
2022-12-15 22:01:50 +01:00
|
|
|
];
|
2023-10-10 22:23:31 +02:00
|
|
|
}
|