summaryrefslogtreecommitdiffstats
path: root/modules/desktop/hyprland.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/desktop/hyprland.nix')
-rw-r--r--modules/desktop/hyprland.nix55
1 files changed, 34 insertions, 21 deletions
diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix
index 5e35608..134d52f 100644
--- a/modules/desktop/hyprland.nix
+++ b/modules/desktop/hyprland.nix
@@ -135,13 +135,17 @@ in {
};
};
};
- extraPortals = [pkgs.xdg-desktop-portal-gtk];
- config.common.default = ["wlr" "gtk"];
+ extraPortals = [
+ pkgs.xdg-desktop-portal-gtk
+ pkgs.xdg-desktop-portal-hyprland
+ ];
+ config.common.default = ["wlr" "gtk" "hyprland" ];
};
home.manager.wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = hyprlandConf.xwayland;
+ systemd.enable = true;
settings = {
"$mod" = "SUPER";
@@ -171,22 +175,41 @@ in {
"swww img ${configDir}/hypr/wallpaper.png"
];
- env = [
+ env = lib.mkMerge [
+ ([
"XDG_CURRENT_DESKTOP,Hyprland"
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
- "GDK_BACKEND=wayland,x11"
- "QT_QPA_PLATFORM=wayland;xcb"
- "CLUTTER_BACKEND=wayland"
- "QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
+ "GDK_BACKEND,wayland,x11"
+ "SDL_VIDEODRIVER,wayland"
+ "CLUTTER_BACKEND,wayland"
+ "MOZ_ENABLE_WAYLAND,1"
+ "MOZ_DISABLE_RDD_SANDBOX,1"
+ "_JAVA_AWT_WM_NONREPARENTING,1"
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
-
- "SDL_VIDEODRIVER=wayland"
+ "QT_QPA_PLATFORM,wayland"
+ "QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
- "disable_hyprland_logo=true"
+ "disable_hyprland_logo,true"
"force_default_wallpaper,0"
- ];
+ ])
+ ( lib.mkIf (config.modules.device.gpu == "nvidia")
+ [
+ "GBM_BACKEND,nvidia"
+ "__GLX_VENDOR_LIBRARY_NAME,nvidia"
+ "LIBVA_DRIVER_NAME,nvidia"
+ "NVD_BACKEND,direct"
+ "PROTON_ENABLE_NGX_UPDATER,1"
+ "__GL_GSYNC_ALLOWED,1"
+ "__GL_VRR_ALLOWED,1"
+ "__GL_MaxFramesAllowed,1"
+ "__NV_PRIME_RENDER_OFFLOAD,1"
+ "__VK_LAYER_NV_optimus,NIVIDA_only"
+ "WLR_DRM_NO_ATOMIC,1"
+ "WLR_USE_LIBINPUT,1"
+ "WLR_RENDERER_ALLOW_SOFTWARE,1"
+ ])];
decoration = decoration;
animations = animations;
@@ -209,16 +232,6 @@ in {
security.pam.services.swaylock = {};
}
- (lib.mkIf (device.gpu == "nvidia") {
- home.manager.wayland.windowManager.hyprland.settings.env = [
- "GBM_BACKEND=nvidia-drm"
- "__GLX_VENDOR_LIBRARY_NAME=nvidia"
- "LIBVA_DRIVER_NAME=nvidia"
- "__GL_GSYNC_ALLOWED"
- "__GL_VRR_ALLOWED"
- "WLR_DRM_NO_ATOMIC=1"
- ];
- })
(lib.mkIf (config.modules.desktop.greetd.enable) {
services.greetd.settings = {
default_session.command = ''