mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-11-23 15:13:12 +01:00
28 lines
593 B
Nix
28 lines
593 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}:
|
|
with lib;
|
|
let
|
|
cfg = config.drivers.amdgpu;
|
|
in
|
|
{
|
|
options.drivers.amdgpu = {
|
|
enable = mkEnableOption "Enable AMD Drivers";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ];
|
|
services.xserver.enable = true;
|
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
# OpenGL
|
|
hardware.opengl = {
|
|
## amdvlk: an open-source Vulkan driver from AMD
|
|
extraPackages = [ pkgs.amdvlk ];
|
|
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
|
|
};
|
|
};
|
|
}
|