Hi, I’m trying to set my GTK3 theme to Colloid-Dark-Catppuccin and my GTK4 to be the default libadwaita dark theme using Home-Manager. However, when I set these options:
gtk = {
enable = true;
theme = {
name = "Colloid-Dark";
package = pkgs.colloid-gtk-theme;
};
cursorTheme = {
package = pkgs.gnome.adwaita-icon-theme;
name = "Adwaita";
};
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
};
Despite the gtk.nix telling that it’s going to use the Colloid-Dark theme only for GTK+2/3, it is applied also to my ~/.config/gtk-4.0/settings.ini.
I’m using the latest version of nixpkgs-unstable and home-manager. Here is my config for further details: tomkoid/nixos-config: My NixOS config - Codeberg.org .
How else can I explain this to achieve the desired outcome?
I think this has been resolved since this pull request has been merged:
master ← khaneliman:gtk4
opened 09:33PM - 30 Jun 25 UTC
### Description
This pull request refactors the GTK configuration module to imp… rove flexibility, readability, and maintainability. Key changes include the introduction of global settings inheritance, per-version overrides for GTK2/3/4, and enhanced testing coverage for the new configuration structure.
### Refactoring and Enhancements to GTK Configuration
* **Global Settings Inheritance**:
- Added a mechanism for global settings (e.g., font, theme, icon theme, cursor theme) to be inherited by all GTK versions (`gtk2`, `gtk3`, `gtk4`).
- Introduced helper functions like `mkGtkSettings` to streamline attribute set generation for GTK settings.
* **Per-Version Overrides**:
- Enhanced configuration options to allow version-specific overrides for GTK2, GTK3, and GTK4. Each version can now have its own settings while optionally inheriting global defaults.
### Improved Testing Structure
* **Expanded Test Coverage**:
- Reorganized test files to separate global inheritance tests from per-version override tests.
- Added new tests to validate global inheritance and per-version overrides for GTK settings and CSS.
Closes https://github.com/nix-community/home-manager/issues/5133
Closes https://github.com/nix-community/home-manager/issues/5900
### Checklist
- [ ] Change is backwards compatible.
- [ ] Code formatted with `nix fmt` or
`nix-shell -p treefmt nixfmt-rfc-style deadnix keep-sorted --run treefmt`.
- [ ] Code tested through `nix-shell --pure tests -A run.all`
or `nix build --reference-lock-file flake.lock ./tests#test-all` using Flakes.
- [ ] Test cases updated/added. See [example](https://github.com/nix-community/home-manager/commit/f3fbb50b68df20da47f9b0def5607857fcc0d021#diff-b61a6d542f9036550ba9c401c80f00ef).
- [ ] Commit messages are formatted like
```
{component}: {description}
{long description}
```
See [CONTRIBUTING](https://nix-community.github.io/home-manager/#sec-commit-style) for more information and [recent commit messages](https://github.com/nix-community/home-manager/commits/master) for examples.
- If this PR adds a new module
- [ ] Added myself as module maintainer. See [example](https://github.com/nix-community/home-manager/blob/a51598236f23c89e59ee77eb8e0614358b0e896c/modules/programs/lesspipe.nix#L11).
#### Maintainer CC