2024-05-22 14:29:45 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2024-05-15 00:14:59 +02:00
|
|
|
theme = {
|
|
|
|
package = pkgs.gruvbox-gtk-theme;
|
|
|
|
name = "Gruvbox-Dark-BL";
|
|
|
|
};
|
2024-07-10 22:10:54 +02:00
|
|
|
cfg = config.modules.theming.qt;
|
2024-07-06 13:39:24 +02:00
|
|
|
inherit (config.modules.other.system) username;
|
2024-04-10 17:39:26 +02:00
|
|
|
in {
|
2024-07-10 22:10:54 +02:00
|
|
|
options.modules.theming.qt = {
|
2024-05-15 00:14:59 +02:00
|
|
|
enable = mkEnableOption "qt theming";
|
|
|
|
name = mkOption {
|
|
|
|
description = "qt theme name";
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
variant = mkOption {
|
|
|
|
description = "qt theme variant";
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
accentColour = mkOption {
|
|
|
|
description = "accent colour for qt theme";
|
|
|
|
type = types.str;
|
2024-04-10 17:39:26 +02:00
|
|
|
};
|
2024-05-15 00:14:59 +02:00
|
|
|
package = mkOption {
|
|
|
|
description = "qt theme package";
|
|
|
|
type = types.package;
|
|
|
|
};
|
|
|
|
};
|
2024-04-10 17:39:26 +02:00
|
|
|
|
2024-05-15 00:14:59 +02:00
|
|
|
config = mkIf cfg.enable {
|
2024-05-22 14:29:45 +02:00
|
|
|
environment.sessionVariables = {QT_QPA_PLATFORMTHEME = "qt5ct";};
|
2024-05-15 00:14:59 +02:00
|
|
|
environment.variables = {
|
|
|
|
QT_STYLE_OVERRIDE = lib.mkForce "kvantum";
|
|
|
|
GTK_THEME = theme.name;
|
|
|
|
};
|
2024-04-10 17:39:26 +02:00
|
|
|
|
2024-05-15 00:14:59 +02:00
|
|
|
home-manager.users.${username} = {
|
|
|
|
qt = {
|
|
|
|
enable = true;
|
|
|
|
platformTheme.name = "qt5ct";
|
|
|
|
# style = {
|
|
|
|
# inherit (cfg) name package;
|
|
|
|
# };
|
|
|
|
};
|
|
|
|
home = {
|
|
|
|
packages = with pkgs; [
|
|
|
|
qt5.qttools
|
|
|
|
libsForQt5.qt5ct
|
|
|
|
libsForQt5.qtstyleplugin-kvantum
|
|
|
|
breeze-icons
|
|
|
|
];
|
|
|
|
};
|
2024-04-10 17:39:26 +02:00
|
|
|
};
|
2024-05-15 00:14:59 +02:00
|
|
|
};
|
2024-04-10 17:39:26 +02:00
|
|
|
}
|