Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/misc/gtk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 6 additions & 3 deletions modules/misc/gtk/gtk4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ in
packageExample = "pkgs.gnome.gnome-themes-extra";
}
);
default = cfg.theme;
defaultText = literalExpression "config.gtk.theme";
description = "Theme for GTK 4 applications.";
default = null;
description = ''
Theme for GTK 4 applications.

Warning: This is not officially supported and applied using a workaround, and may cause issues.
'';
};

iconTheme = mkOption {
Expand Down
10 changes: 10 additions & 0 deletions modules/misc/news/2025/09/2025-09-17_12-26-31.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
time = "2025-09-17T10:26:31+00:00";
condition = true;
message = ''
The option 'gtk.theme' does not apply to GTK 4 automatically anymore. Using a
custom theme is not officially supported by GTK 4, and is 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'.
'';
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ gtk-cursor-theme-size=24
gtk-font-name=Ubuntu 12
gtk-icon-theme-name=Adwaita
gtk-interface-color-scheme=2
gtk-theme-name=Adwaita-dark
4 changes: 0 additions & 4 deletions tests/modules/misc/gtk/gtk-global-inheritance.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,5 @@
assertFileExists home-files/.config/gtk-4.0/settings.ini
assertFileContent home-files/.config/gtk-4.0/settings.ini \
${./gtk-global-inheritance-gtk4-expected.ini}

# Check GTK4 CSS with theme import
assertFileExists home-files/.config/gtk-4.0/gtk.css
assertFileContent home-files/.config/gtk-4.0/gtk.css ${./gtk-global-inheritance-gtk4-css-expected.css}
'';
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ gtk-cursor-theme-name=Global-Cursor
gtk-font-name=GTK4-Font 11
gtk-icon-theme-name=Global-Icons
gtk-recent-files-limit=20
gtk-theme-name=Global-Theme
2 changes: 1 addition & 1 deletion tests/modules/misc/gtk/gtk-per-version-override.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
assertFileContent home-files/.config/gtk-3.0/gtk.css \
${./gtk-per-version-override-gtk3-css-expected.css}

# GTK4 should use overridden font, global theme/icons/cursor
# GTK4 should use overridden font, global icons/cursor
assertFileExists home-files/.config/gtk-4.0/settings.ini
assertFileContent home-files/.config/gtk-4.0/settings.ini \
${./gtk-per-version-override-gtk4-expected.ini}
Expand Down
8 changes: 4 additions & 4 deletions tests/modules/misc/gtk/gtk4/gtk4-basic-settings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
{
gtk = {
enable = true;
theme = {
name = "catppuccin-macchiato-blue-standard";
package = pkgs.catppuccin-gtk;
};
gtk4 = {
theme = {
name = "catppuccin-macchiato-blue-standard";
package = pkgs.catppuccin-gtk;
};
extraConfig = {
gtk-cursor-blink = false;
gtk-recent-files-limit = 20;
Expand Down