Merge pull request #180570 from romildo/upd.nixos.qt5

nixos/qt5: add kde platform theme

authored by

José Romildo Malaquias and committed by
GitHub
7802f1b6 f14058fe

+9 -1
+9 -1
nixos/modules/config/qt5.nix
··· 10 isQtStyle = cfg.platformTheme == "gtk2" && !(builtins.elem cfg.style ["adwaita" "adwaita-dark"]); 11 isQt5ct = cfg.platformTheme == "qt5ct"; 12 isLxqt = cfg.platformTheme == "lxqt"; 13 14 packages = if isQGnome then [ pkgs.qgnomeplatform pkgs.adwaita-qt ] 15 else if isQtStyle then [ pkgs.libsForQt5.qtstyleplugins ] 16 else if isQt5ct then [ pkgs.libsForQt5.qt5ct ] 17 else if isLxqt then [ pkgs.lxqt.lxqt-qtplugin pkgs.lxqt.lxqt-config ] 18 else throw "`qt5.platformTheme` ${cfg.platformTheme} and `qt5.style` ${cfg.style} are not compatible."; 19 20 in ··· 33 "gnome" 34 "lxqt" 35 "qt5ct" 36 ]; 37 example = "gnome"; 38 relatedPackages = [ ··· 40 ["libsForQt5" "qtstyleplugins"] 41 ["libsForQt5" "qt5ct"] 42 ["lxqt" "lxqt-qtplugin"] 43 ]; 44 description = '' 45 Selects the platform theme to use for Qt5 applications.</para> ··· 71 application. 72 </para></listitem> 73 </varlistentry> 74 </variablelist> 75 ''; 76 }; ··· 119 120 environment.variables.QT_QPA_PLATFORMTHEME = cfg.platformTheme; 121 122 - environment.variables.QT_STYLE_OVERRIDE = mkIf (! (isQt5ct || isLxqt)) cfg.style; 123 124 environment.systemPackages = packages; 125
··· 10 isQtStyle = cfg.platformTheme == "gtk2" && !(builtins.elem cfg.style ["adwaita" "adwaita-dark"]); 11 isQt5ct = cfg.platformTheme == "qt5ct"; 12 isLxqt = cfg.platformTheme == "lxqt"; 13 + isKde = cfg.platformTheme == "kde"; 14 15 packages = if isQGnome then [ pkgs.qgnomeplatform pkgs.adwaita-qt ] 16 else if isQtStyle then [ pkgs.libsForQt5.qtstyleplugins ] 17 else if isQt5ct then [ pkgs.libsForQt5.qt5ct ] 18 else if isLxqt then [ pkgs.lxqt.lxqt-qtplugin pkgs.lxqt.lxqt-config ] 19 + else if isKde then [ pkgs.libsForQt5.plasma-integration pkgs.libsForQt5.systemsettings ] 20 else throw "`qt5.platformTheme` ${cfg.platformTheme} and `qt5.style` ${cfg.style} are not compatible."; 21 22 in ··· 35 "gnome" 36 "lxqt" 37 "qt5ct" 38 + "kde" 39 ]; 40 example = "gnome"; 41 relatedPackages = [ ··· 43 ["libsForQt5" "qtstyleplugins"] 44 ["libsForQt5" "qt5ct"] 45 ["lxqt" "lxqt-qtplugin"] 46 + ["libsForQt5" "plasma-integration"] 47 ]; 48 description = '' 49 Selects the platform theme to use for Qt5 applications.</para> ··· 75 application. 76 </para></listitem> 77 </varlistentry> 78 + <varlistentry> 79 + <term><literal>kde</literal></term> 80 + <listitem><para>Use Qt settings from Plasma.</para></listitem> 81 + </varlistentry> 82 </variablelist> 83 ''; 84 }; ··· 127 128 environment.variables.QT_QPA_PLATFORMTHEME = cfg.platformTheme; 129 130 + environment.variables.QT_STYLE_OVERRIDE = mkIf (! (isQt5ct || isLxqt || isKde)) cfg.style; 131 132 environment.systemPackages = packages; 133