mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-11-29 01:53:10 +01:00
32 lines
844 B
Nix
32 lines
844 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}:
|
|
with lib;
|
|
let
|
|
cfg = config.drivers.amdgpu;
|
|
in
|
|
{
|
|
# Declare what settings a user of this "hello.nix" module CAN SET.
|
|
options.drivers.amdgpu = {
|
|
enable = mkEnableOption "Enable AMD Drivers";
|
|
};
|
|
|
|
# Define what other settings, services and resources should be active IF
|
|
# a user of this "hello.nix" module ENABLED this module
|
|
# by setting "services.hello.enable = true;".
|
|
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 ];
|
|
};
|
|
};
|
|
}
|