From 4af7cbde9cdae25e5ecc4a95693b9e0e30ace8b6 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Sun, 20 Jul 2025 14:42:13 -0700 Subject: [PATCH] qt: guard nixosConfig instead of isLinux and osConfig (#1722) Link: https://github.com/nix-community/stylix/pull/1722 Reviewed-by: Kilian Mio <86004375+Mikilio@users.noreply.github.com> Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> --- modules/qt/hm.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/qt/hm.nix b/modules/qt/hm.nix index dd876237..7eea6d20 100644 --- a/modules/qt/hm.nix +++ b/modules/qt/hm.nix @@ -2,21 +2,20 @@ pkgs, config, lib, - osConfig ? null, + nixosConfig ? null, ... }: { options.stylix.targets.qt = { - # 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. + # TODO: Replace `nixosConfig != null` with + # `pkgs.stdenv.hostPlatform.isLinux` once [1] ("bug: setting qt.style.name + # = kvantum makes host systemd unusable") is resolved. # - # [1]: https://github.com/nix-community/stylix/issues/933 - # [2]: https://github.com/nix-community/home-manager/issues/6565 + # [1]: https://github.com/nix-community/home-manager/issues/6565 enable = config.lib.stylix.mkEnableTargetWith { name = "QT"; - autoEnable = pkgs.stdenv.hostPlatform.isLinux && osConfig != null; - autoEnableExpr = "pkgs.stdenv.hostPlatform.isLinux && osConfig != null"; + autoEnable = nixosConfig != null; + autoEnableExpr = "nixosConfig != null"; }; platform = lib.mkOption {