From 47f1504b454bbb76a0bc58f9fa63f6e62ad58682 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 10 Aug 2024 15:48:36 +0200 Subject: [PATCH] hyprland: structurally separate unconditional and conditional settings Link: https://github.com/danth/stylix/pull/501 --- modules/hyprland/hm.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/modules/hyprland/hm.nix b/modules/hyprland/hm.nix index 8bf28f4d..af05940c 100644 --- a/modules/hyprland/hm.nix +++ b/modules/hyprland/hm.nix @@ -41,9 +41,18 @@ in { && cfg.enable && config.wayland.windowManager.hyprland.enable ) - { - services.hyprpaper.enable = cfg.hyprpaper.enable; - stylix.targets.hyprpaper.enable = cfg.hyprpaper.enable; - wayland.windowManager.hyprland.settings = settings; - }; + ( + lib.mkMerge [ + { + wayland.windowManager.hyprland.settings = settings; + } + + ( + lib.mkIf cfg.hyprpaper.enable { + services.hyprpaper.enable = true; + stylix.targets.hyprpaper.enable = true; + } + ) + ] + ); }