qt: fix kvantum breaking plasma6 (#1128)
Reviewed-by: Kilian Mio <86004375+Mikilio@users.noreply.github.com>
This commit is contained in:
parent
38aff11a70
commit
8d5cd725ad
1 changed files with 24 additions and 32 deletions
|
|
@ -30,37 +30,29 @@ in
|
|||
|
||||
config =
|
||||
let
|
||||
broken = config.services.desktopManager.plasma6.enable;
|
||||
warning = {
|
||||
warnings = [
|
||||
"stylix: qt: Plasma6 is currently unsupported: https://github.com/nix-community/home-manager/issues/5098"
|
||||
];
|
||||
};
|
||||
default = lib.mkIf (config.stylix.enable && config.stylix.targets.qt.enable) {
|
||||
|
||||
stylix.targets.qt.platform =
|
||||
with config.services.xserver.desktopManager;
|
||||
if gnome.enable && !(plasma5.enable || lxqt.enable) then
|
||||
"gnome"
|
||||
else if plasma5.enable && !(gnome.enable || lxqt.enable) then
|
||||
"kde"
|
||||
else if lxqt.enable && !(gnome.enable || plasma5.enable) then
|
||||
"lxqt"
|
||||
else
|
||||
"qtct";
|
||||
qt = {
|
||||
enable = true;
|
||||
style = recommendedStyle."${config.qt.platformTheme}" or null;
|
||||
platformTheme =
|
||||
if config.stylix.targets.qt.platform == "qtct" then
|
||||
"qt5ct"
|
||||
else
|
||||
config.stylix.targets.qt.platform;
|
||||
};
|
||||
};
|
||||
inherit (config.services.xserver.desktopManager) gnome plasma5 lxqt;
|
||||
inherit (config.services.desktopManager) plasma6;
|
||||
in
|
||||
lib.mkMerge [
|
||||
(lib.mkIf broken warning)
|
||||
(lib.mkIf (!broken) default)
|
||||
];
|
||||
lib.mkIf (config.stylix.enable && config.stylix.targets.qt.enable) {
|
||||
stylix.targets.qt.platform =
|
||||
if gnome.enable && !(plasma5.enable || plasma6.enable || lxqt.enable) then
|
||||
"gnome"
|
||||
else if plasma5.enable && !(gnome.enable || plasma6.enable || lxqt.enable) then
|
||||
"kde"
|
||||
else if plasma6.enable && !(gnome.enable || plasma5.enable || lxqt.enable) then
|
||||
"kde6"
|
||||
else if lxqt.enable && !(gnome.enable || plasma5.enable || plasma6.enable) then
|
||||
"lxqt"
|
||||
else
|
||||
"qtct";
|
||||
qt = {
|
||||
enable = true;
|
||||
style = recommendedStyle."${config.qt.platformTheme}" or null;
|
||||
platformTheme =
|
||||
if config.stylix.targets.qt.platform == "qtct" then
|
||||
"qt5ct"
|
||||
else
|
||||
config.stylix.targets.qt.platform;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue