From b24fdd1a98e9daa600808d98de76a4ed14b3d98c Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 26 Nov 2024 23:05:36 +0000 Subject: [PATCH] modules/graphics: implement support for AMD graphics --- nix/nixos-modules/graphics.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/nix/nixos-modules/graphics.nix b/nix/nixos-modules/graphics.nix index ef0e9e3..59916df 100644 --- a/nix/nixos-modules/graphics.nix +++ b/nix/nixos-modules/graphics.nix @@ -34,15 +34,13 @@ in ]; } - ( - # TODO replace with drivers - lib.mkIf cfg.amd.enable { - assertions = lib.singleton { - assertion = !cfg.amd.enable; - message = "graphics module missing support for AMD drivers"; - }; - } - ) + # source: https://wiki.nixos.org/wiki/AMD_GPU + (lib.mkIf cfg.amd.enable { + hardware.opengl = { + enable = true; + # more seems not required + }; + }) (lib.mkIf cfg.intel.enable { hardware.opengl = {