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