about summary refs log tree commit diff
path: root/nixos/modules/config
diff options
context:
space:
mode:
authorgnidorah <gnidorah@users.noreply.github.com>2019-10-13 08:55:36 +0300
committergnidorah <gnidorah@users.noreply.github.com>2020-02-21 18:57:56 +0300
commit1bd7ea84ad7e2bb4643ecf0f62e376aeb05ad7be (patch)
tree76c4f6104acd9a55315529d9ac4a7ad844d6a9b4 /nixos/modules/config
parent379c3f685c925f57dc38805a602a96d2f35db130 (diff)
downloadnixlib-1bd7ea84ad7e2bb4643ecf0f62e376aeb05ad7be.tar
nixlib-1bd7ea84ad7e2bb4643ecf0f62e376aeb05ad7be.tar.gz
nixlib-1bd7ea84ad7e2bb4643ecf0f62e376aeb05ad7be.tar.bz2
nixlib-1bd7ea84ad7e2bb4643ecf0f62e376aeb05ad7be.tar.lz
nixlib-1bd7ea84ad7e2bb4643ecf0f62e376aeb05ad7be.tar.xz
nixlib-1bd7ea84ad7e2bb4643ecf0f62e376aeb05ad7be.tar.zst
nixlib-1bd7ea84ad7e2bb4643ecf0f62e376aeb05ad7be.zip
nixos/qt5: rename to qt
Diffstat (limited to 'nixos/modules/config')
-rw-r--r--nixos/modules/config/qt.nix (renamed from nixos/modules/config/qt5.nix)22
1 files changed, 15 insertions, 7 deletions
diff --git a/nixos/modules/config/qt5.nix b/nixos/modules/config/qt.nix
index fb3e03c4b3fe..a145eaab4f1a 100644
--- a/nixos/modules/config/qt5.nix
+++ b/nixos/modules/config/qt.nix
@@ -4,7 +4,7 @@ with lib;
 
 let
 
-  cfg = config.qt5;
+  cfg = config.qt;
 
   toQtIni = generators.toINI {
     mkKeyValue = key: value:
@@ -79,7 +79,7 @@ let
         }
         {
           assertion = cfg.font == null && cfg.iconTheme == null;
-          message = "`qt5.font` and `qt5.iconTheme` are only supported by kde platform.";
+          message = "`qt.font` and `qt.iconTheme` are only supported by kde platform.";
         }
       ];
       environment.variables.QT_QPA_PLATFORMTHEME = "gtk2";
@@ -99,7 +99,7 @@ let
       assertions = [
         {
           assertion = cfg.font == null && cfg.iconTheme == null;
-          message = "`qt5.font` and `qt5.iconTheme` are only supported by kde platform.";
+          message = "`qt.font` and `qt.iconTheme` are only supported by kde platform.";
         }
       ];
       environment.variables.QT_QPA_PLATFORMTHEME = "qgnomeplatform";
@@ -126,7 +126,7 @@ let
         }
         {
           assertion = cfg.font == null && cfg.iconTheme == null;
-          message = "`qt5.font` and `qt5.iconTheme` are only supported by kde platform.";
+          message = "`qt.font` and `qt.iconTheme` are only supported by kde platform.";
         }
       ];
       environment.variables.QT_QPA_PLATFORMTHEME = "gtk3";
@@ -155,16 +155,24 @@ in
 
 {
 
+  imports = [
+    (mkRenamedOptionModule [ "qt5" "style" ] [ "qt" "style" ])
+    (mkRenamedOptionModule [ "qt5" "enable" ] [ "qt" "enable" ])
+    (mkRenamedOptionModule [ "qt5" "platformTheme" ] [ "qt" "platformTheme" ])
+    (mkRenamedOptionModule [ "qt5" "font" ] [ "qt" "font" ])
+    (mkRenamedOptionModule [ "qt5" "iconTheme" ] [ "qt" "iconTheme" ])
+  ];
+
   options = {
-    qt5 = {
+    qt = {
 
-      enable = mkEnableOption "Qt5 theming configuration";
+      enable = mkEnableOption "Qt theming configuration";
 
       platformTheme = mkOption {
         type = types.enum (attrNames platforms);
         example = head (attrNames platforms);
         description = ''
-          Selects the platform theme to use for Qt5 applications.</para>
+          Selects the platform theme to use for Qt applications.</para>
           <para>The options are
           <variablelist>
             ${concatStrings (mapAttrsToList (name: value: value.description) platforms)}