1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-26 21:09:42 +01:00

gpu/amd: drop hardware.amdgpu.opencl option

This now conflicts with nixpkgs.
This commit is contained in:
Jörg Thalheim 2024-06-20 16:05:41 +02:00 committed by mergify[bot]
parent 2f893e185c
commit 083823b790
4 changed files with 12 additions and 17 deletions

View file

@ -6,11 +6,6 @@
) // { ) // {
default = true; default = true;
}; };
options.hardware.amdgpu.opencl = lib.mkEnableOption (lib.mdDoc
"rocm opencl runtime (Install rocmPackages.clr and rocmPackages.clr.icd)"
) // {
default = true;
};
config = lib.mkMerge [ config = lib.mkMerge [
{ {
@ -24,11 +19,5 @@
(lib.mkIf config.hardware.amdgpu.loadInInitrd { (lib.mkIf config.hardware.amdgpu.loadInInitrd {
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
}) })
(lib.mkIf config.hardware.amdgpu.opencl {
hardware.opengl.extraPackages =
if pkgs ? rocmPackages.clr
then with pkgs.rocmPackages; [ clr clr.icd ]
else with pkgs; [ rocm-opencl-icd rocm-opencl-runtime ];
})
]; ];
} }

View file

@ -1,4 +1,4 @@
{ ... }: { lib, options, ... }:
{ {
imports = [ ../hybrid ]; imports = [ ../hybrid ];
@ -12,6 +12,8 @@
# of nix cannot implement such an operation as canceling an import. # of nix cannot implement such an operation as canceling an import.
hardware = { hardware = {
nvidia.prime.offload.enable = false; nvidia.prime.offload.enable = false;
amdgpu.opencl = false; } // lib.optionalAttrs (options ? amdgpu.opencl.enable) {
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
amdgpu.opencl.enable = lib.mkDefault false;
}; };
} }

View file

@ -1,4 +1,4 @@
{ ... }: { lib, options, ... }:
{ {
imports = [ ../hybrid ]; imports = [ ../hybrid ];
@ -12,6 +12,8 @@
# of nix cannot implement such an operation as canceling an import. # of nix cannot implement such an operation as canceling an import.
hardware = { hardware = {
nvidia.prime.offload.enable = false; nvidia.prime.offload.enable = false;
amdgpu.opencl = false; } // lib.optionalAttrs (options ? amdgpu.opencl.enable) {
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
amdgpu.opencl.enable = lib.mkDefault false;
}; };
} }

View file

@ -1,10 +1,12 @@
{ ... }: { lib, options, ... }:
{ {
imports = [ ../hybrid ]; imports = [ ../hybrid ];
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware = { hardware = {
nvidia.prime.offload.enable = false; nvidia.prime.offload.enable = false;
amdgpu.opencl = false; } // lib.optionalAttrs (options ? amdgpu.opencl.enable) {
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
amdgpu.opencl.enable = lib.mkDefault false;
}; };
} }