1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-14 23:19:41 +01:00
nixos-hardware/common/gpu/amd/default.nix

25 lines
601 B
Nix
Raw Normal View History

2024-06-26 08:54:34 +02:00
{ config, lib, ... }:
{
options.hardware.amdgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc
"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 ];
config = lib.mkMerge [
{
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
2024-06-21 15:44:42 +02:00
hardware.graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
}
(lib.mkIf config.hardware.amdgpu.loadInInitrd {
boot.initrd.kernelModules = [ "amdgpu" ];
})
];
}