Home Explore Blog Models CI



nixpkgs

1st chunk of `nixos/modules/services/desktop-managers/gnome.md`
d56c61220966351fdbdf925bc74a64217731ef961e2d0a6a0000000100000dcb
# GNOME Desktop {#chap-gnome}

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.

## Enabling GNOME {#sec-gnome-enable}

All of the core apps, optional apps, games, and core developer tools from GNOME are available.

To enable the GNOME desktop use:

```nix
{
  services.desktopManager.gnome.enable = true;
  services.displayManager.gdm.enable = true;
}
```

::: {.note}
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.
:::

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/48.0/elements/core/meta-gnome-core-apps.bst).

### GNOME without the apps {#sec-gnome-without-the-apps}

If you’d like to only use the GNOME desktop and not the apps, you can disable them with:

```nix
{ services.gnome.core-apps.enable = false; }
```

and none of them will be installed.

If you’d only like to omit a subset of the core utilities, you can use
[](#opt-environment.gnome.excludePackages).
Note that this mechanism can only exclude core utilities, games and core developer tools.

### Disabling GNOME services {#sec-gnome-disabling-services}

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 TinySPARQL with:

```nix
{
  services.gnome.localsearch.enable = false;
  services.gnome.tinysparql.enable = false;
}
```

Note, however, that doing so is not supported and might break some applications. Notably, GNOME Music cannot work without TinySPARQL.

### GNOME games {#sec-gnome-games}

You can install all of the GNOME games with:

```nix
{ services.gnome.games.enable = true; }
```

### GNOME core developer tools {#sec-gnome-core-developer-tools}

You can install GNOME core developer tools with:

```nix
{ services.gnome.core-developer-tools.enable = true; }
```

## Enabling GNOME Flashback {#sec-gnome-enable-flashback}

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:

```nix
{ services.desktopManager.gnome.flashback.enableMetacity = true; }
```

It is also possible to create custom sessions that replace Metacity with a different window manager using [](#opt-services.desktopManager.gnome.flashback.customSessions).

The following example uses `xmonad` window manager:

```nix
{
  services.desktopManager.gnome.flashback.customSessions = [
    {
      wmName = "xmonad";
      wmLabel = "XMonad";
      wmCommand = "${pkgs.haskellPackages.xmonad}/bin/xmonad";
      enableGnomePanel = false;
    }
  ];
}
```

## Icons and GTK Themes {#sec-gnome-icons-and-gtk-themes}

Icon themes and GTK themes don’t require any special option to install in NixOS.

You can add them to [](#opt-environment.systemPackages) and switch to them with GNOME Tweaks.
If you’d like to do this manually in dconf, change the values of the following keys:

```
/org/gnome/desktop/interface/gtk-theme
/org/gnome/desktop/interface/icon-theme
```


Title: GNOME Desktop Configuration in NixOS
Summary
This document outlines how to enable and configure the GNOME desktop environment in NixOS. It covers the basic enablement of GNOME and the recommended GDM display manager, along with options to include or exclude core applications, games, and developer tools. Instructions are also provided for disabling specific GNOME services and enabling GNOME Flashback, including custom sessions with alternative window managers. Finally, it details how to install and apply icon and GTK themes within the GNOME environment.