Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: NAHO <[email protected]>
  • Loading branch information
Mikilio and trueNAHO authored Jan 24, 2025
1 parent bf2601d commit 8deadce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 6 additions & 10 deletions modules/qt/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,24 @@
'';
in
{
warnings = lib.optional (cfg.targets.qt.platform != "qtct") ''
Stylix has not yet implemented qt styling for any platforms other than "qtct".
We are working on it.
'';
warnings =
lib.optional
(cfg.targets.qt.platform != "qtct")
"stylix: qt: config.stylix.targets.qt.platform other than 'qtct' are currently unsupported: ${config.stylix.targets.qt.platform}. Support may be added in the future.";

home.packages = lib.optional (config.qt.style.name == "kvantum") kvantumPackage;

qt = {
enable = true;
style.name = lib.mkIf (
recommendedStyle ? "${config.qt.platformTheme.name}"
) recommendedStyle."${config.qt.platformTheme.name}";
style.name = recommendedStyle."${config.qt.platformTheme.name}" or null;
platformTheme.name = cfg.targets.qt.platform;
};

xdg.configFile = lib.mkMerge [
(lib.mkIf (config.qt.style.name == "kvantum") {
"Kvantum/kvantum.kvconfig".source =
(pkgs.formats.ini { }).generate "kvantum.kvconfig"
{
General.theme = "Base16Kvantum";
};
{ General.theme = "Base16Kvantum"; };

"Kvantum/Base16Kvantum".source =
"${kvantumPackage}/share/Kvantum/Base16Kvantum";
Expand Down
2 changes: 0 additions & 2 deletions modules/qt/nixos.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ in
};

config = lib.mkIf (config.stylix.enable && config.stylix.targets.qt.enable) {

stylix.targets.qt.platform =
if config.services.xserver.desktopManager.gnome.enable then
lib.mkDefault "gnome"
Expand All @@ -52,6 +51,5 @@ in
else
config.stylix.targets.qt.platform;
};

};
}

0 comments on commit 8deadce

Please sign in to comment.