M hosts/arwen/default.nix => hosts/arwen/default.nix +1 -0
@@ 37,6 37,7 @@
roles.zellij.enable = true;
roles.kitty.enable = true;
+ roles.amdgpu.enable = true;
roles.hyprland.enable = true;
roles.gaming = {
A roles/amdgpu.nix => roles/amdgpu.nix +24 -0
@@ 0,0 1,24 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ cfg = config.roles.amdgpu;
+in {
+ options.roles.amdgpu = {
+ enable = lib.mkEnableOption "AMDGPU drivers";
+ };
+
+
+ config = lib.mkIf cfg.enable {
+ boot.initrd.kernelModules = ["amdgpu"];
+
+ services.xserver.videoDrivers = ["amdgpu"];
+
+ hardware.opengl = {
+ enable = true;
+ driSupport = true;
+ driSupport32Bit = true;
+ };
+ };
+}
M roles/default.nix => roles/default.nix +1 -0
@@ 3,6 3,7 @@
./gaming
./shell
+ ./amdgpu.nix # FIXME: merge with nvidia.nix to graphics/ role
./audio.nix
./bluetooth.nix
./base.nix