Gnome extention Hanabi on nixos

GLib setup hook moves it to $out/share/gsettings-schemas/$name to prevent collisions of gschemas.compiled.

The latter is for official extensions developed by the GNOME project. Projects should use the domain name they control, see Application ID docs.

GNOME Shell extensions do not generally expose their settings schemas so that is expected. Actually, on NixOS no projects are exposing their schemas thanks to the aforementioned glib setup hook and the fact that we do not have any global nexus for them, see also GSettings schema of installed software not available to gsettings program or dconf-editor · Issue #33277 · NixOS/nixpkgs · GitHub.

But in this case, the problem is that Hanabi installs the schema to path that it thinks is a global location but it is not due to Nix’s rejection of FHS:

GNOME Shell looks for the schema in global locations (paths listed in XDG_DATA_DIRS environment variable) but since we do not accept schemas as global, they are not present.

Fortunately, GNOME Shell also looks for schemas in the extension’s directory. In fact this is what most extensions do.

You could probably do something like to move it to the regular location:

postInstall = ''
  mv "$out/share/glib-2.0/schemas" "$out/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/schemas"
'';
2 Likes