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
2024-06-21 16:38:07 +00:00

23 lines
570 B
Nix

{ config, lib, pkgs, ... }:
{
options.hardware.amdgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc
"loading `amdgpu` kernelModule at stage 1. (Add `amdgpu` to `boot.initrd.kernelModules`)"
) // {
default = true;
};
config = lib.mkMerge [
{
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
hardware.graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
}
(lib.mkIf config.hardware.amdgpu.loadInInitrd {
boot.initrd.kernelModules = [ "amdgpu" ];
})
];
}