1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 15:41:02 +01:00

gtk4: don't enable theme by default

This is not officially supported and causes issues in some cases.
Also adds a warning to the option.
This commit is contained in:
Fugi 2025-09-15 17:47:32 +02:00 committed by Austin Horstman
parent 86ff0ef506
commit ae9f38e889
10 changed files with 35 additions and 20 deletions

View file

@ -59,7 +59,7 @@ in
theme = mkOption {
type = types.nullOr themeType;
default = null;
description = "Default theme for all GTK versions.";
description = "Default theme for GTK 2/3.";
};
iconTheme = mkOption {

View file

@ -45,9 +45,17 @@ in
packageExample = "pkgs.gnome.gnome-themes-extra";
}
);
default = cfg.theme;
defaultText = literalExpression "config.gtk.theme";
description = "Theme for GTK 4 applications.";
default = if lib.versionOlder config.home.stateVersion "26.05" then cfg.theme else null;
defaultText = literalExpression ''if lib.versionOlder config.home.stateVersion "26.05" then cfg.theme else null'';
description = ''
Theme for GTK 4 applications.
Warning: This is not officially supported and applied using a workaround.
It may cause issues with some apps.
For context, see [Please dont theme our apps](https://stopthemingmy.app/)
and [Restyling apps at scale](https://blogs.gnome.org/tbernard/2018/10/15/restyling-apps-at-scale/).
'';
};
iconTheme = mkOption {

View file

@ -0,0 +1,11 @@
{
time = "2025-11-26T10:55:28+00:00";
condition = true;
message = ''
The option 'gtk.theme' does not apply to GTK 4 automatically anymore for new
installations (with `home.stateVersion` >= "26.05"). Using a custom theme is
not officially supported by GTK 4, and implemented by home-manager using a
workaround that may cause issues in some cases. If you still want to use a GTK
4 theme, you need to explicitly set 'gtk.gtk4.theme'.
'';
}