From 2c20aed3b39a87b8ab7c0d1fef44987f8a69b2d3 Mon Sep 17 00:00:00 2001 From: Flameopathic <64027365+Flameopathic@users.noreply.github.com> Date: Mon, 10 Mar 2025 09:29:06 -0400 Subject: [PATCH] qt: autoenable hm module only on NixOS (#942) Link: https://github.com/danth/stylix/pull/942 Reviewed-by: Kilian Mio <86004375+Mikilio@users.noreply.github.com> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> --- modules/qt/hm.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/qt/hm.nix b/modules/qt/hm.nix index 1d690664..a75c82f9 100644 --- a/modules/qt/hm.nix +++ b/modules/qt/hm.nix @@ -2,11 +2,21 @@ pkgs, config, lib, + osConfig ? null, ... }: { options.stylix.targets.qt = { - enable = config.lib.stylix.mkEnableTarget "QT" pkgs.stdenv.hostPlatform.isLinux; + # TODO: Remove the osConfig workaround [1] ("qt: puts NixOS systemd on + # non-NixOS distro path") once [2] ("bug: setting qt.style.name = kvantum + # makes host systemd unusable") is resolved. + # + # [1]: https://github.com/danth/stylix/issues/933 + # [2]: https://github.com/nix-community/home-manager/issues/6565 + enable = config.lib.stylix.mkEnableTarget "QT" ( + pkgs.stdenv.hostPlatform.isLinux && osConfig != null + ); + platform = lib.mkOption { description = '' Selects the platform theme to use for Qt applications.