rename config.qt5 -> config.qt
This commit is contained in:
parent
16f0d689de
commit
a2e21c76c7
@ -199,9 +199,9 @@ GTK themes can be installed either to user profile or system-wide (via
|
|||||||
GTK ones, you can use the following configuration:
|
GTK ones, you can use the following configuration:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
qt5.enable = true;
|
qt.enable = true;
|
||||||
qt5.platformTheme = "gtk2";
|
qt.platformTheme = "gtk2";
|
||||||
qt5.style = "gtk2";
|
qt.style = "gtk2";
|
||||||
```
|
```
|
||||||
|
|
||||||
## Custom XKB layouts {#custom-xkb-layouts .unnumbered}
|
## Custom XKB layouts {#custom-xkb-layouts .unnumbered}
|
||||||
|
@ -223,9 +223,9 @@ services.xserver.libinput.touchpad.tapping = false;
|
|||||||
configuration:
|
configuration:
|
||||||
</para>
|
</para>
|
||||||
<programlisting language="nix">
|
<programlisting language="nix">
|
||||||
qt5.enable = true;
|
qt.enable = true;
|
||||||
qt5.platformTheme = "gtk2";
|
qt.platformTheme = "gtk2";
|
||||||
qt5.style = "gtk2";
|
qt.style = "gtk2";
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</section>
|
</section>
|
||||||
<section xml:id="custom-xkb-layouts">
|
<section xml:id="custom-xkb-layouts">
|
||||||
|
@ -4,7 +4,7 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.qt5;
|
cfg = config.qt;
|
||||||
|
|
||||||
isQGnome = cfg.platformTheme == "gnome" && builtins.elem cfg.style ["adwaita" "adwaita-dark"];
|
isQGnome = cfg.platformTheme == "gnome" && builtins.elem cfg.style ["adwaita" "adwaita-dark"];
|
||||||
isQtStyle = cfg.platformTheme == "gtk2" && !(builtins.elem cfg.style ["adwaita" "adwaita-dark"]);
|
isQtStyle = cfg.platformTheme == "gtk2" && !(builtins.elem cfg.style ["adwaita" "adwaita-dark"]);
|
||||||
@ -23,17 +23,23 @@ let
|
|||||||
else if isQt5ct then [ pkgs.libsForQt5.qt5ct ]
|
else if isQt5ct then [ pkgs.libsForQt5.qt5ct ]
|
||||||
else if isLxqt then [ pkgs.lxqt.lxqt-qtplugin pkgs.lxqt.lxqt-config ]
|
else if isLxqt then [ pkgs.lxqt.lxqt-qtplugin pkgs.lxqt.lxqt-config ]
|
||||||
else if isKde then [ pkgs.libsForQt5.plasma-integration pkgs.libsForQt5.systemsettings ]
|
else if isKde then [ pkgs.libsForQt5.plasma-integration pkgs.libsForQt5.systemsettings ]
|
||||||
else throw "`qt5.platformTheme` ${cfg.platformTheme} and `qt5.style` ${cfg.style} are not compatible.";
|
else throw "`qt.platformTheme` ${cfg.platformTheme} and `qt.style` ${cfg.style} are not compatible.";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
meta.maintainers = [ maintainers.romildo ];
|
meta.maintainers = [ maintainers.romildo ];
|
||||||
|
|
||||||
options = {
|
imports = [
|
||||||
qt5 = {
|
(mkRenamedOptionModule ["qt5" "enable" ] ["qt" "enable" ])
|
||||||
|
(mkRenamedOptionModule ["qt5" "platformTheme" ] ["qt" "platformTheme" ])
|
||||||
|
(mkRenamedOptionModule ["qt5" "style" ] ["qt" "style" ])
|
||||||
|
];
|
||||||
|
|
||||||
enable = mkEnableOption (lib.mdDoc "Qt5 theming configuration");
|
options = {
|
||||||
|
qt = {
|
||||||
|
|
||||||
|
enable = mkEnableOption (lib.mdDoc "Qt theming configuration");
|
||||||
|
|
||||||
platformTheme = mkOption {
|
platformTheme = mkOption {
|
||||||
type = types.enum [
|
type = types.enum [
|
||||||
@ -53,7 +59,7 @@ in
|
|||||||
["libsForQt5" "plasma-integration"]
|
["libsForQt5" "plasma-integration"]
|
||||||
];
|
];
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Selects the platform theme to use for Qt5 applications.
|
Selects the platform theme to use for Qt applications.
|
||||||
|
|
||||||
The options are
|
The options are
|
||||||
- `gtk`: Use GTK theme with [qtstyleplugins](https://github.com/qt/qtstyleplugins)
|
- `gtk`: Use GTK theme with [qtstyleplugins](https://github.com/qt/qtstyleplugins)
|
||||||
@ -82,7 +88,7 @@ in
|
|||||||
["libsForQt5" "qtstyleplugins"]
|
["libsForQt5" "qtstyleplugins"]
|
||||||
];
|
];
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Selects the style to use for Qt5 applications.
|
Selects the style to use for Qt applications.
|
||||||
|
|
||||||
The options are
|
The options are
|
||||||
- `adwaita`, `adwaita-dark`: Use Adwaita Qt style with
|
- `adwaita`, `adwaita-dark`: Use Adwaita Qt style with
|
@ -31,7 +31,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Theme calamares with GNOME theme
|
# Theme calamares with GNOME theme
|
||||||
qt5 = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme = "gnome";
|
platformTheme = "gnome";
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
./config/nsswitch.nix
|
./config/nsswitch.nix
|
||||||
./config/power-management.nix
|
./config/power-management.nix
|
||||||
./config/pulseaudio.nix
|
./config/pulseaudio.nix
|
||||||
./config/qt5.nix
|
./config/qt.nix
|
||||||
./config/resolvconf.nix
|
./config/resolvconf.nix
|
||||||
./config/shells-environment.nix
|
./config/shells-environment.nix
|
||||||
./config/swap.nix
|
./config/swap.nix
|
||||||
|
@ -198,10 +198,10 @@ in
|
|||||||
programs.bash.vteIntegration = mkDefault true;
|
programs.bash.vteIntegration = mkDefault true;
|
||||||
programs.zsh.vteIntegration = mkDefault true;
|
programs.zsh.vteIntegration = mkDefault true;
|
||||||
|
|
||||||
# Harmonize Qt5 applications under Cinnamon
|
# Harmonize Qt applications under Cinnamon
|
||||||
qt5.enable = true;
|
qt.enable = true;
|
||||||
qt5.platformTheme = "gnome";
|
qt.platformTheme = "gnome";
|
||||||
qt5.style = "adwaita";
|
qt.style = "adwaita";
|
||||||
|
|
||||||
# Default Fonts
|
# Default Fonts
|
||||||
fonts.fonts = with pkgs; [
|
fonts.fonts = with pkgs; [
|
||||||
|
@ -352,8 +352,8 @@ in
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
# Harmonize Qt5 application style and also make them use the portal for file chooser dialog.
|
# Harmonize Qt application style and also make them use the portal for file chooser dialog.
|
||||||
qt5 = {
|
qt = {
|
||||||
enable = mkDefault true;
|
enable = mkDefault true;
|
||||||
platformTheme = mkDefault "gnome";
|
platformTheme = mkDefault "gnome";
|
||||||
style = mkDefault "adwaita";
|
style = mkDefault "adwaita";
|
||||||
|
@ -250,10 +250,10 @@ in
|
|||||||
programs.bash.vteIntegration = mkDefault true;
|
programs.bash.vteIntegration = mkDefault true;
|
||||||
programs.zsh.vteIntegration = mkDefault true;
|
programs.zsh.vteIntegration = mkDefault true;
|
||||||
|
|
||||||
# Harmonize Qt5 applications under Pantheon
|
# Harmonize Qt applications under Pantheon
|
||||||
qt5.enable = true;
|
qt.enable = true;
|
||||||
qt5.platformTheme = "gnome";
|
qt.platformTheme = "gnome";
|
||||||
qt5.style = "adwaita";
|
qt.style = "adwaita";
|
||||||
|
|
||||||
# Default Fonts
|
# Default Fonts
|
||||||
fonts.fonts = with pkgs; [
|
fonts.fonts = with pkgs; [
|
||||||
|
@ -17,7 +17,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
|
|||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
|
||||||
# Regression test for https://github.com/NixOS/nixpkgs/issues/163482
|
# Regression test for https://github.com/NixOS/nixpkgs/issues/163482
|
||||||
qt5 = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme = "gnome";
|
platformTheme = "gnome";
|
||||||
style = "adwaita-dark";
|
style = "adwaita-dark";
|
||||||
|
Loading…
Reference in New Issue
Block a user