1 # GNOME Desktop {#chap-gnome}
3 GNOME provides a simple, yet full-featured desktop environment with a focus on productivity. Its Mutter compositor supports both Wayland and X server, and the GNOME Shell user interface is fully customizable by extensions.
5 ## Enabling GNOME {#sec-gnome-enable}
7 All of the core apps, optional apps, games, and core developer tools from GNOME are available.
9 To enable the GNOME desktop use:
13 services.xserver.desktopManager.gnome.enable = true;
14 services.xserver.displayManager.gdm.enable = true;
19 While it is not strictly necessary to use GDM as the display manager with GNOME, it is recommended, as some features such as screen lock [might not work](#sec-gnome-faq-can-i-use-lightdm-with-gnome) without it.
22 The default applications used in NixOS are very minimal, inspired by the defaults used in [gnome-build-meta](https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/40.0/elements/core/meta-gnome-core-utilities.bst).
24 ### GNOME without the apps {#sec-gnome-without-the-apps}
26 If you’d like to only use the GNOME desktop and not the apps, you can disable them with:
30 services.gnome.core-utilities.enable = false;
34 and none of them will be installed.
36 If you’d only like to omit a subset of the core utilities, you can use
37 [](#opt-environment.gnome.excludePackages).
38 Note that this mechanism can only exclude core utilities, games and core developer tools.
40 ### Disabling GNOME services {#sec-gnome-disabling-services}
42 It is also possible to disable many of the [core services](https://github.com/NixOS/nixpkgs/blob/b8ec4fd2a4edc4e30d02ba7b1a2cc1358f3db1d5/nixos/modules/services/x11/desktop-managers/gnome.nix#L329-L348). For example, if you do not need indexing files, you can disable Tracker with:
46 services.gnome.tracker-miners.enable = false;
47 services.gnome.tracker.enable = false;
51 Note, however, that doing so is not supported and might break some applications. Notably, GNOME Music cannot work without Tracker.
53 ### GNOME games {#sec-gnome-games}
55 You can install all of the GNOME games with:
59 services.gnome.games.enable = true;
63 ### GNOME core developer tools {#sec-gnome-core-developer-tools}
65 You can install GNOME core developer tools with:
69 services.gnome.core-developer-tools.enable = true;
73 ## Enabling GNOME Flashback {#sec-gnome-enable-flashback}
75 GNOME Flashback provides a desktop environment based on the classic GNOME 2 architecture. You can enable the default GNOME Flashback session, which uses the Metacity window manager, with:
79 services.xserver.desktopManager.gnome.flashback.enableMetacity = true;
83 It is also possible to create custom sessions that replace Metacity with a different window manager using [](#opt-services.xserver.desktopManager.gnome.flashback.customSessions).
85 The following example uses `xmonad` window manager:
89 services.xserver.desktopManager.gnome.flashback.customSessions = [
93 wmCommand = "${pkgs.haskellPackages.xmonad}/bin/xmonad";
94 enableGnomePanel = false;
100 ## Icons and GTK Themes {#sec-gnome-icons-and-gtk-themes}
102 Icon themes and GTK themes don’t require any special option to install in NixOS.
104 You can add them to [](#opt-environment.systemPackages) and switch to them with GNOME Tweaks.
105 If you’d like to do this manually in dconf, change the values of the following keys:
108 /org/gnome/desktop/interface/gtk-theme
109 /org/gnome/desktop/interface/icon-theme
114 ## Shell Extensions {#sec-gnome-shell-extensions}
116 Most Shell extensions are packaged under the `gnomeExtensions` attribute.
117 Some packages that include Shell extensions, like `gpaste`, don’t have their extension decoupled under this attribute.
119 You can install them like any other package:
123 environment.systemPackages = [
124 gnomeExtensions.dash-to-dock
125 gnomeExtensions.gsconnect
126 gnomeExtensions.mpris-indicator-button
131 Unfortunately, we lack a way for these to be managed in a completely declarative way.
132 So you have to enable them manually with an Extensions application.
133 It is possible to use a [GSettings override](#sec-gnome-gsettings-overrides) for this on `org.gnome.shell.enabled-extensions`, but that will only influence the default value.
135 ## GSettings Overrides {#sec-gnome-gsettings-overrides}
137 Majority of software building on the GNOME platform use GLib’s [GSettings](https://developer.gnome.org/gio/unstable/GSettings.html) system to manage runtime configuration. For our purposes, the system consists of XML schemas describing the individual configuration options, stored in the package, and a settings backend, where the values of the settings are stored. On NixOS, like on most Linux distributions, dconf database is used as the backend.
139 [GSettings vendor overrides](https://developer.gnome.org/gio/unstable/GSettings.html#id-1.4.19.2.9.25) can be used to adjust the default values for settings of the GNOME desktop and apps by replacing the default values specified in the XML schemas. Using overrides will allow you to pre-seed user settings before you even start the session.
142 Overrides really only change the default values for GSettings keys so if you or an application changes the setting value, the value set by the override will be ignored. Until [NixOS’s dconf module implements changing values](https://github.com/NixOS/nixpkgs/issues/54150), you will either need to keep that in mind and clear the setting from the backend using `dconf reset` command when that happens, or use the [module from home-manager](https://nix-community.github.io/home-manager/options.html#opt-dconf.settings).
145 You can override the default GSettings values using the
146 [](#opt-services.xserver.desktopManager.gnome.extraGSettingsOverrides) option.
148 Take note that whatever packages you want to override GSettings for, you need to add them to
149 [](#opt-services.xserver.desktopManager.gnome.extraGSettingsOverridePackages).
151 You can use `dconf-editor` tool to explore which GSettings you can set.
153 ### Example {#sec-gnome-gsettings-overrides-example}
157 services.xserver.desktopManager.gnome = {
158 extraGSettingsOverrides = ''
159 # Change default background
160 [org.gnome.desktop.background]
161 picture-uri='file://${pkgs.nixos-artwork.wallpapers.mosaic-blue.gnomeFilePath}'
163 # Favorite apps in gnome-shell
165 favorite-apps=['org.gnome.Console.desktop', 'org.gnome.Nautilus.desktop']
168 extraGSettingsOverridePackages = [
169 pkgs.gsettings-desktop-schemas # for org.gnome.desktop
170 pkgs.gnome-shell # for org.gnome.shell
176 ## Frequently Asked Questions {#sec-gnome-faq}
178 ### Can I use LightDM with GNOME? {#sec-gnome-faq-can-i-use-lightdm-with-gnome}
180 Yes you can, and any other display-manager in NixOS.
182 However, it doesn’t work correctly for the Wayland session of GNOME Shell yet, and
183 won’t be able to lock your screen.
185 See [this issue.](https://github.com/NixOS/nixpkgs/issues/56342)