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>
This commit is contained in:
Flameopathic 2025-03-10 09:29:06 -04:00 committed by GitHub
parent d732a61453
commit 2c20aed3b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.