From 2d631c86daae14ff2cb289eea61880000b8dfbad Mon Sep 17 00:00:00 2001 From: ediblerope Date: Mon, 11 May 2026 19:59:19 +0100 Subject: [PATCH] gnome: route headerbar CSS through stylix.targets.gtk.extraCss MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plain gtk.gtk{3,4}.extraCss is silently dropped once stylix owns the theme — stylix prints an evaluation warning and writes nothing. Move the headerbar-shrink customisations to stylix.targets.gtk.extraCss so they actually apply. Also switch qt.platformTheme from the deprecated "gnome" to "adwaita". Co-Authored-By: Claude Opus 4.7 --- settings/gnome.nix | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/settings/gnome.nix b/settings/gnome.nix index 4fa16b2..ae5861f 100644 --- a/settings/gnome.nix +++ b/settings/gnome.nix @@ -49,7 +49,7 @@ qt = { enable = true; - platformTheme = "gnome"; + platformTheme = "adwaita"; style = "adwaita-dark"; }; @@ -60,25 +60,21 @@ home-manager.users.fred = { config, lib, pkgs, ... }: { # Minimal titlebars — stylix manages the GTK theme; we layer our # headerbar shrink on top via programs.gtk.*.extraCss. - gtk = { - enable = true; - gtk3.extraCss = '' - headerbar { min-height: 0; padding: 0; margin: 0; } - headerbar .title { font-size: 0; } - ''; - gtk4.extraCss = '' - headerbar { min-height: 0; padding: 0; margin: 0; } - headerbar .title { font-size: 0; } - window:backdrop { - background-color: @window_bg_color; - color: @window_fg_color; - } - window:backdrop headerbar { - background-color: @headerbar_bg_color; - color: @headerbar_fg_color; - } - ''; - }; + gtk.enable = true; + # gtk.gtk3.extraCss / gtk4.extraCss are no-ops once stylix owns the + # theme — extra CSS has to go through stylix.targets.gtk.extraCss. + stylix.targets.gtk.extraCss = '' + headerbar { min-height: 0; padding: 0; margin: 0; } + headerbar .title { font-size: 0; } + window:backdrop { + background-color: @window_bg_color; + color: @window_fg_color; + } + window:backdrop headerbar { + background-color: @headerbar_bg_color; + color: @headerbar_fg_color; + } + ''; # GNOME dconf settings — stylix owns colour-scheme, gtk-theme, # cursor-theme and accent-color now.