From b4821ece01818a4702b332e9bc54b093c50d5d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 21 Aug 2016 11:58:14 +0200 Subject: [PATCH] nixos: blacklist radeon module if using amdgpu --- nixos/modules/hardware/video/amdgpu.nix | 9 +++++++++ nixos/modules/module-list.nix | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 nixos/modules/hardware/video/amdgpu.nix diff --git a/nixos/modules/hardware/video/amdgpu.nix b/nixos/modules/hardware/video/amdgpu.nix new file mode 100644 index 000000000000..42fc8fa362de --- /dev/null +++ b/nixos/modules/hardware/video/amdgpu.nix @@ -0,0 +1,9 @@ +{ config, lib, ... }: + +with lib; +{ + config = mkIf (elem "amdgpu" config.services.xserver.videoDrivers) { + boot.blacklistedKernelModules = [ "radeon" ]; + }; +} + diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 41615a8a9dc3..eb89ff83e2ce 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -37,9 +37,10 @@ ./hardware/network/rtl8192c.nix ./hardware/opengl.nix ./hardware/pcmcia.nix + ./hardware/video/amdgpu.nix + ./hardware/video/ati.nix ./hardware/video/bumblebee.nix ./hardware/video/nvidia.nix - ./hardware/video/ati.nix ./hardware/video/webcam/facetimehd.nix ./i18n/input-method/default.nix ./i18n/input-method/fcitx.nix