Skip to content

fix(nix): wrap gsettings-desktop-schemas - #4061

Open
nicobonada wants to merge 1 commit into
noctalia-dev:mainfrom
nicobonada:nix-gsettings-schemas
Open

fix(nix): wrap gsettings-desktop-schemas#4061
nicobonada wants to merge 1 commit into
noctalia-dev:mainfrom
nicobonada:nix-gsettings-schemas

Conversation

@nicobonada

Copy link
Copy Markdown

Summary

Prefix gsettings-desktop-schemas onto XDG_DATA_DIRS in the existing
wrapProgram (same pattern as git on PATH).

Motivation

Tray IconName lookup uses GSettings (org.gnome.desktop.interface).
glib does not ship that schema. On NixOS without GNOME it is also not
on the session profile, so IconResolver only searches hicolor.

Apps that advertise a themed name and no pixmap (e.g. Solaar
battery-090) then miss and the tray falls back to the menu-2 glyph.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Build / packaging

Related Issue

None open that I could find. Closest prior report is #2859 (hamburger
after a restart); that was SNI re-registration, not schema lookup.

Testing

  • nix build .#default
  • Wrapper prefixes
    …/gsettings-desktop-schemas-*/share/gsettings-schemas/…
  • gsettings get org.gnome.desktop.interface icon-theme is
    No schemas installed without the prefix, 'Papirus-Dark' with it
  • Replaced the running user unit with the built binary on niri: Solaar
    still published IconName=battery-090, tray showed the Papirus
    battery glyph instead of menu-2

Manual Coverage

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors

Screenshots / Videos

Happy to attach a before/after of the tray (hamburger → battery).

Checklist

  • This PR is ready for review, or it is marked as Draft.
  • I read and followed the relevant guidance in CONTRIBUTING.md.
  • I ran just format with clang-format v22+ installed, or this PR has no code changes.
  • I ran the relevant build or test commands, or explained why they were not run.
  • I self-reviewed the changes.
  • I checked for new warnings or errors.
  • I will update end-user documentation after merge, or this PR does not change user-facing configuration or behavior.
  • I added or updated assets/translations/en.json, or this PR adds no new user-facing strings.
  • I did not edit non-English translation files unless this PR is explicitly for translation tooling, an import/export sync, or a maintainer-requested locale change.
  • I used the existing canonical names for config keys, IPC names, paths, and identifiers.

Additional Notes

nixpkgs GNOME packaging (doc/languages-frameworks/gnome.section.md)
would normally use wrapGAppsNoGuiHook so the glib setup hook can put
GSETTINGS_SCHEMAS_PATH on XDG_DATA_DIRS.

This package already wrapPrograms for git. Using that hook here
means dontWrapGApps plus splicing gappsWrapperArgs into the existing
wrapper, and it also injects $out/share, default /usr/share, and
dconf.lib on GIO_EXTRA_MODULES. One explicit --prefix XDG_DATA_DIRS
is the single path we need, same style as the git wrap.

Tray IconName lookup uses GSettings (org.gnome.desktop.interface).
glib does not ship that schema, so on NixOS without GNOME the resolver
only searches hicolor and themed names (e.g. battery-090) fall back to
the menu-2 glyph.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant