Skip to content

Commit c464c44

Browse files
nixos/gnome & nixos/gdm: move out of x11
Since DEs like KDE Plasma 6, GNOME and COSMIC are not designed to be X11-exclusive, putting them under `services.xserver` is misleading. In particular, GNOME defaults to Wayland these days and X11 support is going to be dropped in near future. Let’s follow Plasma and move GNOME NixOS options out of `xserver` attribute. This patch does not include any changes to X11 support itself. Signed-off-by: John Titor <[email protected]>
1 parent bfbf67f commit c464c44

File tree

24 files changed

+134
-72
lines changed

24 files changed

+134
-72
lines changed

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
- any-glob-to-any-file:
163163
- doc/languages-frameworks/gnome.section.md
164164
- nixos/modules/services/desktops/gnome/**/*
165-
- nixos/modules/services/x11/desktop-managers/gnome.nix
165+
- nixos/modules/services/desktop-managers/gnome.nix
166166
- nixos/tests/gnome-xorg.nix
167167
- nixos/tests/gnome.nix
168168
- pkgs/desktops/gnome/**/*

nixos/doc/manual/configuration/x-windows.chapter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Thus you should pick one or more of the following lines:
2929
{
3030
services.xserver.desktopManager.plasma5.enable = true;
3131
services.xserver.desktopManager.xfce.enable = true;
32-
services.xserver.desktopManager.gnome.enable = true;
32+
services.desktopManager.gnome.enable = true;
3333
services.xserver.desktopManager.mate.enable = true;
3434
services.xserver.windowManager.xmonad.enable = true;
3535
services.xserver.windowManager.twm.enable = true;
@@ -46,7 +46,7 @@ alternative one by picking one of the following lines:
4646
```nix
4747
{
4848
services.displayManager.sddm.enable = true;
49-
services.xserver.displayManager.gdm.enable = true;
49+
services.displayManager.gdm.enable = true;
5050
}
5151
```
5252

nixos/doc/manual/release-notes/rl-2505.section.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Alongside many enhancements to NixOS modules and general system improvements, th
2020
- GNOME has been updated to version 48.
2121

2222
- `decibels` music player is now installed by default. You can disable it using [](#opt-environment.gnome.excludePackages).
23-
- `gnome-shell-extensions` extension collection (which included GNOME Classic extensions, Apps Menu, and User Themes, among others) are no longer installed by default. You can install them again with [](#opt-services.xserver.desktopManager.gnome.sessionPath).
23+
- `gnome-shell-extensions` extension collection (which included GNOME Classic extensions, Apps Menu, and User Themes, among others) are no longer installed by default. You can install them again with {option}`services.xserver.desktopManager.gnome.sessionPath`.
2424
- Option [](#opt-services.gnome.core-developer-tools.enable) now also installs `sysprof` and `d-spy`.
2525
- Option `services.gnome.core-utilities.enable` has been renamed to [](#opt-services.gnome.core-apps.enable).
2626
- `cantarell-fonts`, `source-code-pro` and `source-sans` fonts are no longer installed by default. They have been replaced by `adwaita-fonts`.

nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
isoImage.edition = lib.mkDefault "gnome";
99

10-
services.xserver.desktopManager.gnome = {
10+
services.desktopManager.gnome = {
1111
# Add Firefox and other tools useful for installation to the launcher
1212
favoriteAppsOverride = ''
1313
[org.gnome.shell]
@@ -35,7 +35,7 @@
3535
QT_QPA_PLATFORM = "$([[ $XDG_SESSION_TYPE = \"wayland\" ]] && echo \"wayland\")";
3636
};
3737

38-
services.xserver.displayManager.gdm = {
38+
services.displayManager.gdm = {
3939
enable = true;
4040
# autoSuspend makes the machine automatically suspend after inactivity.
4141
# It's possible someone could/try to ssh'd into the machine and obviously

nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
isoImage.edition = lib.mkDefault "gnome";
99

10-
services.xserver.desktopManager.gnome = {
10+
services.desktopManager.gnome = {
1111
# Add Firefox and other tools useful for installation to the launcher
1212
favoriteAppsOverride = ''
1313
[org.gnome.shell]
@@ -16,7 +16,7 @@
1616
enable = true;
1717
};
1818

19-
services.xserver.displayManager.gdm = {
19+
services.displayManager.gdm = {
2020
enable = true;
2121
# autoSuspend makes the machine automatically suspend after inactivity.
2222
# It's possible someone could/try to ssh'd into the machine and obviously

nixos/modules/module-list.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@
589589
./services/development/zammad.nix
590590
./services/display-managers/cosmic-greeter.nix
591591
./services/display-managers/default.nix
592+
./services/display-managers/gdm.nix
592593
./services/display-managers/greetd.nix
593594
./services/display-managers/ly.nix
594595
./services/display-managers/sddm.nix
@@ -1706,7 +1707,6 @@
17061707
./services/x11/colord.nix
17071708
./services/x11/desktop-managers/default.nix
17081709
./services/x11/display-managers/default.nix
1709-
./services/x11/display-managers/gdm.nix
17101710
./services/x11/display-managers/lightdm.nix
17111711
./services/x11/display-managers/slim.nix
17121712
./services/x11/display-managers/startx.nix

nixos/modules/programs/gpaste.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
services.dbus.packages = [ pkgs.gpaste ];
2828
systemd.packages = [ pkgs.gpaste ];
2929
# gnome-control-center crashes in Keyboard Shortcuts pane without the GSettings schemas.
30-
services.xserver.desktopManager.gnome.sessionPath = [ pkgs.gpaste ];
30+
services.desktopManager.gnome.sessionPath = [ pkgs.gpaste ];
3131
# gpaste-reloaded applet doesn't work without the typelib
3232
services.xserver.desktopManager.cinnamon.sessionPath = [ pkgs.gpaste ];
3333
};

nixos/modules/programs/nautilus-open-any-terminal.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ in
2828
nautilus-open-any-terminal
2929
];
3030

31-
environment.sessionVariables = lib.mkIf (!config.services.xserver.desktopManager.gnome.enable) {
31+
environment.sessionVariables = lib.mkIf (!config.services.desktopManager.gnome.enable) {
3232
NAUTILUS_4_EXTENSION_DIR = "${pkgs.nautilus-python}/lib/nautilus/extensions-4";
3333
};
3434

nixos/modules/programs/zoom-us.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
# Support GNOME desktop environment if it's enabled on the system.
3535
gnomeXdgDesktopPortalSupport =
36-
prev.gnomeXdgDesktopPortalSupport or config.services.xserver.desktopManager.gnome.enable;
36+
prev.gnomeXdgDesktopPortalSupport or config.services.desktopManager.gnome.enable;
3737

3838
# Support Hyprland desktop for Wayland if it's enabled on the system.
3939
hyprlandXdgDesktopPortalSupport =

nixos/modules/services/x11/desktop-managers/gnome.md renamed to nixos/modules/services/desktop-managers/gnome.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ To enable the GNOME desktop use:
1010

1111
```nix
1212
{
13-
services.xserver.desktopManager.gnome.enable = true;
14-
services.xserver.displayManager.gdm.enable = true;
13+
services.desktopManager.gnome.enable = true;
14+
services.displayManager.gdm.enable = true;
1515
}
1616
```
1717

@@ -76,17 +76,17 @@ GNOME Flashback provides a desktop environment based on the classic GNOME 2 arch
7676

7777
```nix
7878
{
79-
services.xserver.desktopManager.gnome.flashback.enableMetacity = true;
79+
services.desktopManager.gnome.flashback.enableMetacity = true;
8080
}
8181
```
8282

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).
83+
It is also possible to create custom sessions that replace Metacity with a different window manager using [](#opt-services.desktopManager.gnome.flashback.customSessions).
8484

8585
The following example uses `xmonad` window manager:
8686

8787
```nix
8888
{
89-
services.xserver.desktopManager.gnome.flashback.customSessions = [
89+
services.desktopManager.gnome.flashback.customSessions = [
9090
{
9191
wmName = "xmonad";
9292
wmLabel = "XMonad";
@@ -143,18 +143,18 @@ Overrides really only change the default values for GSettings keys so if you or
143143
:::
144144

145145
You can override the default GSettings values using the
146-
[](#opt-services.xserver.desktopManager.gnome.extraGSettingsOverrides) option.
146+
[](#opt-services.desktopManager.gnome.extraGSettingsOverrides) option.
147147

148148
Take note that whatever packages you want to override GSettings for, you need to add them to
149-
[](#opt-services.xserver.desktopManager.gnome.extraGSettingsOverridePackages).
149+
[](#opt-services.desktopManager.gnome.extraGSettingsOverridePackages).
150150

151151
You can use `dconf-editor` tool to explore which GSettings you can set.
152152

153153
### Example {#sec-gnome-gsettings-overrides-example}
154154

155155
```nix
156156
{
157-
services.xserver.desktopManager.gnome = {
157+
services.desktopManager.gnome = {
158158
extraGSettingsOverrides = ''
159159
# Change default background
160160
[org.gnome.desktop.background]

0 commit comments

Comments
 (0)