{ config, lib, ... }:
let
  cfg = config.my.desktop;
in
{
  environment.sessionVariables = {
    NIXOS_OZONE_WL = "1";
    GDK_BACKEND = "wayland,x11,*";
    GDK_SCALE = "2"; # GDK Scaling Factor (no fractional scaling)

    MOZ_ENABLE_WAYLAND = "1";
    MOZ_DISABLE_RDD_SANDBOX = "1";

    OZONE_PLATFORM = "wayland";

    ELECTRON_OZONE_PLATFORM_HINT = "auto";

    SDL_VIDEODRIVER = "wayland";
    CLUTTER_BACKEND = "wayland";

    QT_QPA_PLATFORM = "wayland;xcb";
    XDG_MENU_PREFIX = "plasma-";
    QT_QPA_PLATFORMTHEME_QT6 = "qt5ct";
    GTK_THEME = "Adwaita:dark";
    QS_ICON_THEME = "Papirus-Dark";

    LIBVA_DRIVER_NAME = "nvidia";
    __GLX_VENDOR_LIBRARY_NAME = "nvidia";
    GBM_BACKEND = "nvidia-drm";
    TERMINAL = "kitty";

    __GL_GSYNC_ALLOWED = "1";
    __GL_VRR_ALLOWED = "1";

    EDITOR = "code";
    STLEDITOR = "code";

    XCURSOR_SIZE = "16";

    XDG_SESSION_DESKTOP = lib.optionalString cfg.hyprland.enable "Hyprland";
    AQ_DRM_DEVICES = lib.optionalString cfg.hyprland.enable "/dev/dri/nvidia-dgpu";
  };
}