This commit is contained in:
Charlie Root 2024-07-22 22:46:11 +02:00
commit 46d79f6f18
12 changed files with 151 additions and 57 deletions

View file

@ -4,43 +4,37 @@
...
}: let
cfg = config.modules.wms.wayland;
hyprland = config.modules.wms.wayland.hyprland;
inherit (lib) mkIf mkEnableOption;
in {
options.modules.wms.wayland.enable = lib.mkEnableOption "wayland";
# options.modules.wms.wayland.hyprland.enable = mkEnableOption "hyprland";
config = lib.mkIf cfg.enable {
# lib.mkMerge [
# {
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";
DISABLE_QT5_COMPAT = "0";
GDK_BACKEND = "wayland";
ANKI_WAYLAND = "1";
#WLR_DRM_NO_ATOMIC = "1";
#QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland";
DISABLE_QT_COMPAT = "0";
#QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
MOZ_ENABLE_WAYLAND = "1";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
# Session variables for Hyprland
# (lib.mkIf (hyprland.enable) {
# environment.variables = {
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";
WLR_RENDERER_ALLOW_SOFTWARE = "1";
# Needed anymore?
LIBSEAT_BACKEND = "logind";
};
# })
# ];
};
}