From e6056c72d16d1326c5b9a8ab6c022d445054c1e9 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 23 Jul 2018 01:11:56 +0200 Subject: [PATCH] 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. --- .../services/x11/desktop-managers/gnome3.nix | 35 +++++-------------- 1 file 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"