nixos/gnome3: Add back sessionPath
Implement through `services.xserver.displayManager.sessionCommands`.
This commit is contained in:
parent
e8e0edd95c
commit
ee34f2537a
@ -21,6 +21,7 @@ with lib;
|
|||||||
config = mkIf config.services.gnome3.gpaste.enable {
|
config = mkIf config.services.gnome3.gpaste.enable {
|
||||||
environment.systemPackages = [ pkgs.gnome3.gpaste ];
|
environment.systemPackages = [ pkgs.gnome3.gpaste ];
|
||||||
services.dbus.packages = [ pkgs.gnome3.gpaste ];
|
services.dbus.packages = [ pkgs.gnome3.gpaste ];
|
||||||
|
services.xserver.desktopManager.gnome3.sessionPath = [ pkgs.gnome3.gpaste ];
|
||||||
systemd.packages = [ pkgs.gnome3.gpaste ];
|
systemd.packages = [ pkgs.gnome3.gpaste ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,14 @@ in {
|
|||||||
description = "Enable Gnome 3 desktop manager.";
|
description = "Enable Gnome 3 desktop manager.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sessionPath = mkOption {
|
||||||
|
default = [];
|
||||||
|
example = literalExample "[ pkgs.gnome3.gpaste ]";
|
||||||
|
description = "Additional list of packages to be added to the session search path.
|
||||||
|
Useful for gnome shell extensions or gsettings-conditionated autostart.";
|
||||||
|
apply = list: list ++ [ pkgs.gnome3.gnome-shell pkgs.gnome3.gnome-shell-extensions ];
|
||||||
|
};
|
||||||
|
|
||||||
extraGSettingsOverrides = mkOption {
|
extraGSettingsOverrides = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
@ -120,6 +128,22 @@ in {
|
|||||||
|
|
||||||
services.xserver.displayManager.extraSessionFilePackages = [ pkgs.gnome3.gnome-session ];
|
services.xserver.displayManager.extraSessionFilePackages = [ pkgs.gnome3.gnome-session ];
|
||||||
|
|
||||||
|
services.xserver.displayManager.sessionCommands = ''
|
||||||
|
if test "$XDG_CURRENT_DESKTOP" = "GNOME"; then
|
||||||
|
${concatMapStrings (p: ''
|
||||||
|
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
|
||||||
|
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "${p}/lib/girepository-1.0" ]; then
|
||||||
|
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
|
||||||
|
fi
|
||||||
|
'') cfg.sessionPath}
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
# Override default mimeapps
|
# Override default mimeapps
|
||||||
environment.variables.XDG_DATA_DIRS = [ "${mimeAppsList}/share" ];
|
environment.variables.XDG_DATA_DIRS = [ "${mimeAppsList}/share" ];
|
||||||
|
|
||||||
@ -133,7 +157,7 @@ in {
|
|||||||
environment.variables.GIO_EXTRA_MODULES = [ "${lib.getLib pkgs.gnome3.dconf}/lib/gio/modules"
|
environment.variables.GIO_EXTRA_MODULES = [ "${lib.getLib pkgs.gnome3.dconf}/lib/gio/modules"
|
||||||
"${pkgs.gnome3.glib-networking.out}/lib/gio/modules"
|
"${pkgs.gnome3.glib-networking.out}/lib/gio/modules"
|
||||||
"${pkgs.gnome3.gvfs}/lib/gio/modules" ];
|
"${pkgs.gnome3.gvfs}/lib/gio/modules" ];
|
||||||
environment.systemPackages = pkgs.gnome3.corePackages
|
environment.systemPackages = pkgs.gnome3.corePackages ++ cfg.sessionPath
|
||||||
++ (removePackagesByName pkgs.gnome3.optionalPackages config.environment.gnome3.excludePackages) ++ [
|
++ (removePackagesByName pkgs.gnome3.optionalPackages config.environment.gnome3.excludePackages) ++ [
|
||||||
pkgs.xdg-user-dirs # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
|
pkgs.xdg-user-dirs # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user