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