fix(desktop): the GTK theme rewrite is permanent, not a migration

moonarch 6ea02b5 moves to the same Catppuccin Mocha Lavender theme, so the
rewrite no longer bridges Colloid to Catppuccin. It now bridges two names
for the identical theme: Arch installs the upstream 1.0.3 release zips,
whose directories carry the full build name with the +default tweak marker,
while nixpkgs builds the same source with no tweaks and drops the suffix.
Neither side can take the other's name without going out of its way, so
this stays.

Comment rewritten to say that, and to keep the reason it matters: GTK3
reads settings.ini directly — the dconf entry only reaches applications
that ask GSettings, which on Wayland the GTK3 ones do not — so a name that
does not resolve puts every GTK3 application on Adwaita with no error
anywhere. That is exactly the state moonarch was in until 6ea02b5, where
the named theme was installed by no package at all.

Verified with --override-input: both hosts build, and the deployed
settings.ini carries the nixpkgs name while moonarch's source carries the
Arch one.
This commit is contained in:
nevaforget committed 2026-09-12 02:26:40 +02:00
1 parent 3d67eb7bbf
commit 9b60d5cdd0
1 file changed
+13 -7
+13 -7
View File
@@ -58,15 +58,21 @@ let
# The GTK theme name, in the one place both consumers below read it from.
gtkTheme = "catppuccin-mocha-lavender-standard";
# moonarch's settings.ini still names Colloid, and GTK3 reads that file
# directly — the dconf entry further down only reaches applications that ask
# GSettings, which on Wayland is not the GTK3 ones. A stale name there would
# therefore put every GTK3 application on Adwaita rather than on the theme
# actually installed. Rewritten here until moonarch switches too, the same
# treatment waypaper gets above.
# Both distributions ship the same Catppuccin GTK theme, 1.0.3, and still
# disagree on its name — permanently, not as a migration. Arch installs the
# upstream release zips through catppuccin-gtk-theme-mocha, whose directories
# carry the full build name with the `+default` tweak marker; nixpkgs builds
# the same source with no tweaks and so names it without that suffix. Neither
# side can adopt the other's name without going out of its way.
#
# The rewrite therefore has to stay. It matters because GTK3 reads
# settings.ini directly — the dconf entry further down only reaches
# applications that ask GSettings, which on Wayland the GTK3 ones do not — so
# a name that does not resolve puts every GTK3 application on Adwaita, with
# no error anywhere.
gtkSettings = version: pkgs.runCommand "gtk${version}-settings.ini" { } ''
substitute ${xdg}/gtk-${version}/settings.ini "$out" \
--replace-fail Colloid-Grey-Dark-Catppuccin ${gtkTheme}
--replace-fail catppuccin-mocha-lavender-standard+default ${gtkTheme}
'';
# niri prefers ~/.config/niri/config.kdl over /etc/niri/config.kdl and does not