DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

fe57eebacda44d73fbecd4071a35919e01e40117 — Jonni Liljamo 4 months ago e878289
feat(roles/amdgpu, hosts/arwen): amdgpu role
3 files changed, 26 insertions(+), 0 deletions(-)

M hosts/arwen/default.nix
A roles/amdgpu.nix
M roles/default.nix
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