From 1e80a0b3d8ef2a9ffc0399b32edcd588ac396fa6 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sun, 22 Oct 2023 19:13:20 +0100 Subject: [PATCH] qt: allow usage without setting platformTheme --- modules/misc/qt.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/misc/qt.nix b/modules/misc/qt.nix index f45b8e3d..19986579 100644 --- a/modules/misc/qt.nix +++ b/modules/misc/qt.nix @@ -173,7 +173,7 @@ in { + (makeQtPath "qtQmlPrefix"); }; - in lib.mkIf (cfg.enable && cfg.platformTheme != null) { + in lib.mkIf cfg.enable { assertions = [{ assertion = cfg.platformTheme == "gnome" -> cfg.style.name != null && cfg.style.package != null; @@ -206,8 +206,8 @@ in { ++ lib.optionals (cfg.style.package != null) (lib.toList cfg.style.package); - xsession.importedVariables = - [ "QT_QPA_PLATFORMTHEME" "QT_PLUGIN_PATH" "QML2_IMPORT_PATH" ] + xsession.importedVariables = [ "QT_PLUGIN_PATH" "QML2_IMPORT_PATH" ] + ++ lib.optionals (cfg.platformTheme != null) [ "QT_QPA_PLATFORMTHEME" ] ++ lib.optionals (cfg.style.name != null) [ "QT_STYLE_OVERRIDE" ]; }; }