nixnew/modules/theme/default.nix

74 lines
1.9 KiB
Nix

{ self, lib, config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
qt5ct
breeze-qt5
breeze-gtk
breeze-icons
];
environment.variables = let
qmlPackages = with pkgs; [
plasma5Packages.qqc2-desktop-style
plasma5Packages.kirigami2
];
qtVersion = pkgs.qt515.qtbase.version;
in {
"QT_QPA_PLATFORMTHEME" = "qt5ct";
"QML2_IMPORT_PATH" = "${lib.concatStringsSep ":" (builtins.map (p: "${p}/lib/qt-${qtVersion}/qml") qmlPackages)}";
};
home-manager.users.${config.main-user} = {
home.file.".icons/default/index.theme".text = ''
[Icon Theme]
Inherits=breeze_cursors
'';
xdg.configFile = {
# fixes dolphin background colors
"kdeglobals".source = "${pkgs.breeze-qt5}/share/color-schemes/BreezeDark.colors";
"qt5ct/qt5ct.conf".text = ''
[Appearance]
style=Breeze
icon_theme=breeze-dark
standard_dialogs=xdgdesktopportal
# Cantata misbehaves without color overrides. This overrides the breeze colors with the
# exact same colors.
color_scheme_path=${./breeze-dark-colors-override.conf}
custom_palette=true
[Interface]
buttonbox_layout=0
cursor_flash_time=1000
dialog_buttons_have_icons=2
double_click_interval=400
gui_effects=General, AnimateMenu, AnimateCombo
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
'';
};
gtk = {
enable = true;
theme = {
package = pkgs.breeze-gtk;
name = "Breeze-Dark";
};
iconTheme = {
package = pkgs.breeze-icons;
name = "breeze-dark";
};
cursorTheme = {
package = pkgs.breeze-gtk;
name = "breeze_cursors";
};
};
};
}