summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2018-07-23 01:11:56 +0200
committerJan Tojnar <jtojnar@gmail.com>2018-08-01 19:14:31 +0200
commite6056c72d16d1326c5b9a8ab6c022d445054c1e9 (patch)
tree20871c7d98845b35a7d20764187ad834c7f615cc /nixos/modules
parenteb65e5ce56ab2f55ae5ee74d2fd883672a35ab42 (diff)
downloadnixlib-e6056c72d16d1326c5b9a8ab6c022d445054c1e9.tar
nixlib-e6056c72d16d1326c5b9a8ab6c022d445054c1e9.tar.gz
nixlib-e6056c72d16d1326c5b9a8ab6c022d445054c1e9.tar.bz2
nixlib-e6056c72d16d1326c5b9a8ab6c022d445054c1e9.tar.lz
nixlib-e6056c72d16d1326c5b9a8ab6c022d445054c1e9.tar.xz
nixlib-e6056c72d16d1326c5b9a8ab6c022d445054c1e9.tar.zst
nixlib-e6056c72d16d1326c5b9a8ab6c022d445054c1e9.zip
nixos/gnome3: use upstream session file
Pass gnome-session to extraSessionFilePackages, remove unnecessary environment variables, move the rest out of old session option, and then drop the option.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/x11/desktop-managers/gnome3.nix35
1 files changed, 8 insertions, 27 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix
index 61a0c9e95d71..b1c7e5a7aac0 100644
--- a/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -118,36 +118,17 @@ in {
 
     fonts.fonts = [ pkgs.dejavu_fonts pkgs.cantarell-fonts ];
 
-    services.xserver.desktopManager.session = singleton
-      { name = "gnome3";
-        bgSupport = true;
-        start = ''
-          # Set GTK_DATA_PREFIX so that GTK+ can find the themes
-          export GTK_DATA_PREFIX=${config.system.path}
+    services.xserver.displayManager.extraSessionFilePackages = [ pkgs.gnome3.gnome-session ];
 
-          # find theme engines
-          export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
+    # Override default mimeapps
+    environment.variables.XDG_DATA_DIRS = [ "${mimeAppsList}/share" ];
 
-          export XDG_MENU_PREFIX=gnome-
+    # Override GSettings schemas
+    environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
 
-          # Override default mimeapps
-          export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${mimeAppsList}/share
-
-          # Override gsettings-desktop-schema
-          export NIX_GSETTINGS_OVERRIDES_DIR=${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
-
-          # Let nautilus find extensions
-          export NAUTILUS_EXTENSION_DIR=${config.system.path}/lib/nautilus/extensions-3.0/
-
-          # Find the mouse
-          export XCURSOR_PATH=~/.icons:${config.system.path}/share/icons
-
-          ${pkgs.gnome3.gnome-session}/bin/gnome-session ${optionalString cfg.debug "--debug"} &
-          waitPID=$!
-        '';
-      };
-
-    services.xserver.updateDbusEnvironment = true;
+    # Let nautilus find extensions
+    # TODO: Create nautilus-with-extensions package
+    environment.variables.NAUTILUS_EXTENSION_DIR = "${config.system.path}/lib/nautilus/extensions-3.0";
 
     environment.variables.GIO_EXTRA_MODULES = [ "${lib.getLib pkgs.gnome3.dconf}/lib/gio/modules"
                                                 "${pkgs.gnome3.glib-networking.out}/lib/gio/modules"