{ pkgs, config, lib, ... }:
let
  cfg = config.my;
in
{
  programs.nix-ld = lib.mkIf (cfg.rgb.enable || cfg.openlinkhub.enable ) {
    enable = true;
    libraries = with pkgs; [
      stdenv.cc.cc
      glibc
      xorg.libX11
      xorg.libXcursor
      xorg.libXrandr
      xorg.libXinerama
      xorg.libXi
      wayland
      libGL
      libdrm
      alsa-lib
      pulseaudio
      glib
      nspr.out
      nss.out
      dbus.lib
      at-spi2-atk
      cups.lib
      cairo.out
      gtk3.out
      pango.out
      libxcomposite.out
      libxdamage.out
      libxext.out
      libxfixes.out
      libgbm.out
      expat.out
      libxcb.out
      libxkbcommon.out
    ];
  };
}