diff options
author | gnidorah <gnidorah@users.noreply.github.com> | 2019-10-14 20:45:39 +0300 |
---|---|---|
committer | gnidorah <gnidorah@users.noreply.github.com> | 2020-02-21 18:57:56 +0300 |
commit | 956c60eda8408b9aff735afdcdeb16b21a27b480 (patch) | |
tree | 7b1d4e6611def7bb26ebd7ea0c4e525441a1ffb3 /nixos | |
parent | 1bd7ea84ad7e2bb4643ecf0f62e376aeb05ad7be (diff) | |
download | nixlib-956c60eda8408b9aff735afdcdeb16b21a27b480.tar nixlib-956c60eda8408b9aff735afdcdeb16b21a27b480.tar.gz nixlib-956c60eda8408b9aff735afdcdeb16b21a27b480.tar.bz2 nixlib-956c60eda8408b9aff735afdcdeb16b21a27b480.tar.lz nixlib-956c60eda8408b9aff735afdcdeb16b21a27b480.tar.xz nixlib-956c60eda8408b9aff735afdcdeb16b21a27b480.tar.zst nixlib-956c60eda8408b9aff735afdcdeb16b21a27b480.zip |
nixos/qt: support theming qt4
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/config/qt.nix | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/nixos/modules/config/qt.nix b/nixos/modules/config/qt.nix index a145eaab4f1a..87d07ccfb342 100644 --- a/nixos/modules/config/qt.nix +++ b/nixos/modules/config/qt.nix @@ -30,6 +30,12 @@ let optionalAttrs (cfg.iconTheme != null) { Theme = cfg.iconTheme.name; }; + qt = + optionalAttrs (cfg.font != null) + { font = ''"${cfg.font.name}"''; } + // + { style = "GTK+"; }; + fontType = types.submodule { options = { package = mkOption { @@ -168,6 +174,14 @@ in enable = mkEnableOption "Qt theming configuration"; + qt4 = mkOption { + type = types.bool; + default = true; + description = '' + Whether to enable theming for obsolete Qt4 engine. + ''; + }; + platformTheme = mkOption { type = types.enum (attrNames platforms); example = head (attrNames platforms); @@ -227,7 +241,12 @@ in environment.variables = attrByPath [ cfg.platformTheme "environment" "variables" ] {} platforms; - environment.etc = attrByPath [ cfg.platformTheme "environment" "etc" ] {} platforms; + environment.etc = attrByPath [ cfg.platformTheme "environment" "etc" ] {} platforms // { + "xdg/Trolltech.conf".text = + toQtIni { + Qt = qt; + }; + }; environment.systemPackages = attrByPath [ cfg.platformTheme "environment" "systemPackages" ] [] platforms ++ optionalPackage cfg.font |