Add amd support to xorg module

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-05-02 14:44:29 +02:00
parent afa6ce6247
commit 460b4e1ddc
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -22,7 +22,7 @@ in {
enable = mkEnableOption "XServer for my setup style"; enable = mkEnableOption "XServer for my setup style";
gpu = mkOption { gpu = mkOption {
description = "Which GPU type do you have?"; description = "Which GPU type do you have?";
type = types.enum ["nvidia"]; type = types.enum ["nvidia" "amd" ];
}; };
nvidia = mkOption { nvidia = mkOption {
@ -96,6 +96,9 @@ in {
nvidiaBusId = cfg.nvidia.nvidiaBusId; nvidiaBusId = cfg.nvidia.nvidiaBusId;
}; };
}) })
(mkIf (cfg.gpu == "amd") {
services.xserver.videoDrivers = [ "amd" ];
})
(mkIf cfg.qwertyNeo2 { (mkIf cfg.qwertyNeo2 {
services.xserver.displayManager.sessionCommands = services.xserver.displayManager.sessionCommands =