nichts/modules/wms/wayland/variables.nix
Bloxx12 53aaa26fa1 flake: inherit explicitly from parts of lib
Instead of doing `inherit (lib) <something>``, all inherits now use
`inherit (lib.<subsystem>) <something>`, which is much nicer.
2025-04-09 16:13:31 +02:00

41 lines
847 B
Nix

{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.wms.wayland;
in {
options.modules.wms.wayland.enable = mkEnableOption "wayland";
config = mkIf cfg.enable {
environment.variables = {
NIXOS_OZONE_WL = "1";
__GL_GSYNC_ALLOWED = "0";
__GL_VRR_ALLOWED = "0";
GDK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland";
MOZ_ENABLE_WAYLAND = "1";
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
LIBVA_DRIVER_NAME = "nvidia";
GTK_USE_PORTAL = "1";
NIXOS_XDG_OPEN_USE_PORTAL = "1";
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
LIBSEAT_BACKEND = "logind";
};
};
}