# Gnome extensions: missing GMenu, GTop

**URL:** https://discourse.nixos.org/t/gnome-extensions-missing-gmenu-gtop/21142
**Category:** Help
**Created:** [August 21, 2022, 5:33pm UTC](https://discourse.nixos.org/t/gnome-extensions-missing-gmenu-gtop/21142 "2022-08-21T17:33:13Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![nyx](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/n/dc4da7/32.png) [@nyx](https://discourse.nixos.org/u/nyx)
#### Post date: [August 21, 2022, 5:33pm UTC](https://discourse.nixos.org/t/gnome-extensions-missing-gmenu-gtop/21142/1 "2022-08-21T17:33:13Z")

</div>

Hi, these are my first days with NixOS, so please bear with me 🙂

I know the issue is somehow linked to gnome-menus and gnome-introspection, but I installed both system-wide (as a wild guess…), and still I cannot enable either of:

- `gnomeExtensions.applications-menu` (installed system-wide: `…systemPackages…`) because `GMenu` is missing;
- `gnomeExtensions.system-monitor-2` (installed for me only: `users.users.yves.packages…`) because `GTop` is missing.

Other extensions work fine when compatible with the current Gnome.

I find it awfully hard to debug the issue in NixOS ☹ → I did not find:

- how to search for packages that _would provide_ a file named `.*/GMenu.*`;
- how to list the files of locally installed package `gnome-menus`;
- why I cannot get the status of all packages: `nix-env -qaPs` shows less packages than `nix-env -qaP` does…

How do I get a Gnome menu? If you know of another Gnome menu that is working fine, please name it, and I’ll just switch to that one.

---

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [August 21, 2022, 6:19pm UTC](https://discourse.nixos.org/t/gnome-extensions-missing-gmenu-gtop/21142/2 "2022-08-21T18:19:19Z")

</div>

> [@nyx](#):
>
> I know the issue is somehow linked to gnome-menus and gnome-introspection, but I installed both system-wide (as a wild guess…), and still I cannot enable either of:

Installing libraries globally is not supported on NixOS, see [https://nixos.wiki/wiki/FAQ#I\_installed\_a\_library\_but\_my\_compiler\_is\_not\_finding\_it.\_Why.3F](https://nixos.wiki/wiki/FAQ#I_installed_a_library_but_my_compiler_is_not_finding_it._Why.3F). Instead, the extensions need to be patched as mentioned in the [GNOME section of Nixpkgs manual](https://nixos.org/manual/nixpkgs/stable/#ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext).

> [@nyx](#):
>
> how to search for packages that _would provide_ a file named `.*/GMenu.*` ;

You can use `nix-locate` command of [`nix-index`](https://github.com/bennofs/nix-index):

```auto
$ nix-locate girepository-1.0/GMenu
gnome-menus.out 5,964 r /nix/store/36sc4k17ypjxci29zp9yzcrzvpbj3jwv-gnome-menus-3.36.0/lib/girepository-1.0/GMenu-3.0.typelib

$ nix-locate girepository-1.0/GTop
libgtop.out 47,244 r /nix/store/gk73fj5p3980p2vif4q8pcq50k00wq9y-libgtop-2.40.0/lib/girepository-1.0/GTop-2.0.typelib

```

> [@nyx](#):
>
> how to list the files of locally installed package `gnome-menus`

As mentioned, this does not make much sense, as libraries are not supposed to be installed. There are hacks to allow using globally installed GObject Introspection typelibs but they are very much against Nix philosophy.

> [@nyx](#):
>
> If you know of another Gnome menu that is working fine, please name it, and I’ll just switch to that one.

“Applications Menu” should be installed by default.

---

<div class="post-metadata">

### Author: ![nyx](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/n/dc4da7/32.png) [@nyx](https://discourse.nixos.org/u/nyx)
#### Post date: [August 22, 2022, 6:49am UTC](https://discourse.nixos.org/t/gnome-extensions-missing-gmenu-gtop/21142/3 "2022-08-22T06:49:17Z")

</div>

Thank you jtojnar for all the explanations.

I see that the example in the “GNOME section of Nixpkgs manual” is exactly about the problem I have. So if I understand correctly, there are 2 different situations.

1. For `gnomeExtensions.applications-menu`, the problem would be that I installed it, which probably retrieved an unpatched version (why?), while the patched version was already available as part of Gnome 3 (but I did not realize because extensions were not enabled).  
  
But then, how do I know which extensions are already bundled with Gnome 3? In the Git repository linked to by the URL you gave, I see that `gnome-shell-extensions` is included in Gnome 3, but how do I see the metadata of an uninstalled package? → list of files, description, configuration options…

2. As for `gnomeExtensions.system-monitor-2`, I doubt it is included. So it was badly packaged?  
  
Is there a way I can live-fix it while declaring its installation in `configuration.nix`?

---

<div class="post-metadata">

### Author: ![nyx](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/n/dc4da7/32.png) [@nyx](https://discourse.nixos.org/u/nyx)
#### Post date: [August 22, 2022, 7:06am UTC](https://discourse.nixos.org/t/gnome-extensions-missing-gmenu-gtop/21142/4 "2022-08-22T07:06:31Z")

</div>

> [@nyx](#):
>
> For `gnomeExtensions.applications-menu` , the problem […]

I can confirm: I “uninstalled” this extension, and now it is available _and working_, bundled _and patched_ as part of Gnome 3.

Could it be, that all other extensions should be installed by changing options of Gnome 3 instead of adding them on their own? If yes, how?

---

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [August 23, 2022, 6:18pm UTC](https://discourse.nixos.org/t/gnome-extensions-missing-gmenu-gtop/21142/5 "2022-08-23T18:18:55Z")

</div>

> [@nyx](#):
>
> For `gnomeExtensions.applications-menu` , the problem would be that I installed it, which probably retrieved an unpatched version (why?), while the patched version was already available as part of Gnome 3 (but I did not realize because extensions were not enabled).

We automatically package all extensions from [https://extensions.gnome.org/](https://extensions.gnome.org/) but the the official GNOME extensions packaged in `gnome-shell-extensions` package are bit of a special case since they are a part of a [single project](https://gitlab.gnome.org/GNOME/gnome-shell-extensions) and are packaged together as such. We should either remove them from the list of automatically packaged extensions or make the attributes point to `gnome.gnome-shell-extensions`.

If you have both packages installed, there is probably a file conflict so Nix chooses the file it ¿sees first?

> [@nyx](#):
>
> As for `gnomeExtensions.system-monitor-2` , I doubt it is included. So it was badly packaged?

Since it is automatically packaged, it is indeed packaged incorrectly. The system is not smart enough and will require a human intervention. @piegames I wonder how hard it would be to scan extensions for typelib includes and resolve that automatically. Then again there are external dependencies on programs installed to `PATH`, which would be much harder to catch.

> [@nyx](#):
>
> Could it be, that all other extensions should be installed by changing options of Gnome 3 instead of adding them on their own? If yes, how?

GNOME Shell extensions installed through Nix should work. If they do not please open a bug in Nixpkgs issue tracker.

---

<div class="post-metadata">

### Author: ![nyx](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/n/dc4da7/32.png) [@nyx](https://discourse.nixos.org/u/nyx)
#### Post date: [August 23, 2022, 6:30pm UTC](https://discourse.nixos.org/t/gnome-extensions-missing-gmenu-gtop/21142/6 "2022-08-23T18:30:34Z")

</div>

Thank you jtojnar for clarifying all this for me!

I really do not mean to criticize or anything. I am just in the dark because Nix and NixOS are so new to me.  
For example, I’ve read [this blog post](https://gvolpe.com/blog/gnome3-on-nixos/) (hoping it is still relevant), and I am wondering if HomeManager would be a recommended tool to use, or if I should continue with `users.users.*.packages` in the main configuration… So much to discover!

Anyway, all you explained seems very sensible to me 🙂 I’ll try and create issues in the Nixpkgs tracker when I see problems. It’s [on GitHub](https://github.com/NixOS/nixpkgs/issues), isn’t it?

---

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [August 23, 2022, 8:09pm UTC](https://discourse.nixos.org/t/gnome-extensions-missing-gmenu-gtop/21142/7 "2022-08-23T20:09:25Z")

</div>

> [@nyx](#):
>
> For example, I’ve read [this blog post](https://gvolpe.com/blog/gnome3-on-nixos/) (hoping it is still relevant)

Yes, that blog post still applies (though you need to replace `gnome3` by `gnome` in package names and NixOS options).

> [@nyx](#):
>
> I am wondering if HomeManager would be a recommended tool to use, or if I should continue with `users.users.*.packages` in the main configuration…

I think the only reason Home manager is not officially recomended is because it is still a third party project. It is pretty nice for managing the GNOME configuration and [what I personally use](https://github.com/jtojnar/nixfiles/blob/8c76926485a79d9345e55f3e8caddd144ddde930/hosts/theo/configuration.nix#L481-L562). But you can as well achieve that with plain NixOS configuration, which I did [previously](https://github.com/jtojnar/nixfiles/commit/aa535a4c3043467dc5c96cbc790d9ee3f336933f).

The dconf solution of home-manager is nicer in that you do not need to re-login after switching to the new configuration for the settings change to apply and it is not ignored if you change the settings in the app. But it is more error prone since you are not manipulating GSettings system but the backing database store.

> [@nyx](#):
>
> I’ll try and create issues in the Nixpkgs tracker when I see problems. It’s [on GitHub](https://github.com/NixOS/nixpkgs/issues), isn’t it?

Correct.
