mirror of
https://github.com/blahai/nyx.git
synced 2025-07-01 07:04:22 -04:00
Hardware stuffies
This commit is contained in:
parent
63eac33d05
commit
5edcb857af
9 changed files with 184 additions and 0 deletions
24
modules/nixos/hardware/gpu/amd.nix
Normal file
24
modules/nixos/hardware/gpu/amd.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (config.olympus) device;
|
||||
in {
|
||||
config = mkIf (device.gpu == "amd") {
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
|
||||
boot = {
|
||||
kernelModules = ["amdgpu"];
|
||||
initrd.kernelModules = ["amdgpu"];
|
||||
};
|
||||
|
||||
# enables AMDVLK & OpenCL support
|
||||
hardware.graphics.extraPackages = [
|
||||
pkgs.rocmPackages.clr
|
||||
pkgs.rocmPackages.clr.icd
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue