From a4a571c2d696c707f02da30da121f7809a85516b Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 7 Jan 2026 09:16:18 -0600 Subject: [PATCH] Revert "hyprland: dont recompile when disabling xwayland" This reverts commit c91dbdf61a42d0fb4b61f87417d533e59863491d. --- modules/services/window-managers/hyprland.nix | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index 9254e04f..1a1caee4 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -48,11 +48,6 @@ in [ "wayland" "windowManager" "hyprland" "systemdIntegration" ] # \ [ "wayland" "windowManager" "hyprland" "systemd" "enable" ] ) - - (lib.mkRenamedOptionModule # \ - [ "wayland" "windowManager" "hyprland" "xwayland" "enable" ] # \ - [ "wayland" "windowManager" "hyprland" "settings" "xwayland" "enable" ] - ) ]; options.wayland.windowManager.hyprland = { @@ -84,7 +79,11 @@ in finalPackage = lib.mkOption { type = with lib.types; nullOr package; readOnly = true; - default = if cfg.package != null then cfg.package else null; + default = + if cfg.package != null then + cfg.package.override { enableXWayland = cfg.xwayland.enable; } + else + null; defaultText = lib.literalMD "`wayland.windowManager.hyprland.package` with applied configuration"; description = '' The Hyprland package after applying configuration. @@ -163,6 +162,10 @@ in {manpage}`systemd-xdg-autostart-generator(8)`''; }; + xwayland.enable = lib.mkEnableOption "XWayland" // { + default = true; + }; + settings = lib.mkOption { type = with lib.types; @@ -354,10 +357,7 @@ in submapWarnings ++ lib.optional inconsistent warning; home.packages = lib.mkIf (cfg.package != null) ( - [ cfg.finalPackage ] - ++ lib.optional ( - (lib.hasAttrByPath [ "settings" "xwayland" "enable" ] cfg) && cfg.settings.xwayland.enable - ) pkgs.xwayland + [ cfg.finalPackage ] ++ lib.optional cfg.xwayland.enable pkgs.xwayland ); xdg.configFile."hypr/hyprland.conf" =