From 8c285dd7dab36141e4032e6d4407734f63714753 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Sun, 26 Oct 2025 23:20:22 +0100 Subject: [PATCH] add qt app theme config --- modules/gnome.nix | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/modules/gnome.nix b/modules/gnome.nix index 4740d44..9be5b2c 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -128,15 +128,32 @@ in x11.enable = true; }; - # Configure GTK icon theme + # Configure GTK theme and icon theme gtk = { enable = true; + theme = { + package = pkgs.gnome-themes-extra; + name = "Adwaita-dark"; + }; iconTheme = { package = pkgs.adwaita-icon-theme; name = "Adwaita"; }; }; + # Configure Qt theming to match GNOME dark theme + qt = { + enable = true; + platformTheme.name = "adwaita"; + style.name = "adwaita-dark"; + }; + + # Environment variables for consistent dark mode across all applications + home.sessionVariables = { + GTK_THEME = "Adwaita:dark"; + QT_QPA_PLATFORMTHEME = "adwaita"; + }; + # Configure XDG user directories xdg.userDirs = { enable = true; @@ -155,10 +172,14 @@ in templates = null; }; - # GNOME Shell extensions + # GNOME Shell extensions and Qt theming packages home.packages = with pkgs; [ gnomeExtensions.hide-top-bar gnomeExtensions.pano + + # Qt theming packages for dark mode support + adwaita-qt + adwaita-qt6 ]; # Custom desktop file for opening text files with Neovim in Ghostty