gnome3: add services.xserver.desktopManager.gnome3.sessionPath
Used to add GI_TYPELIB_PATH and LD_LIBRARY_PATH for gnome shell extensions or other libraries and services. Not a great solution but may be the start for further work. Let's make some cool packages work for now.
This commit is contained in:
parent
7050914ed2
commit
3d0dc6a143
1 changed files with 21 additions and 4 deletions
|
@ -35,6 +35,14 @@ in {
|
|||
description = "Enable Gnome 3 desktop manager.";
|
||||
};
|
||||
|
||||
services.xserver.desktopManager.gnome3.sessionPath = mkOption {
|
||||
default = [];
|
||||
example = "[ 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 ++ [ gnome3.gnome_shell ];
|
||||
};
|
||||
|
||||
environment.gnome3.packageSet = mkOption {
|
||||
default = pkgs.gnome3;
|
||||
example = literalExample "pkgs.gnome3_12";
|
||||
|
@ -86,10 +94,19 @@ in {
|
|||
|
||||
export XDG_MENU_PREFIX=gnome
|
||||
|
||||
# Don't let epiphany depend upon gnome-shell
|
||||
# Don't let gnome-session depend upon vino (for .desktop autostart condition)
|
||||
${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}
|
||||
|
||||
# Override default mimeapps
|
||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${gnome3.gnome_shell}/share/gsettings-schemas/${gnome3.gnome_shell.name}:${gnome3.vino}/share/gsettings-schemas/${gnome3.vino.name}:${mimeAppsList}/share
|
||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${mimeAppsList}/share
|
||||
|
||||
# Let gnome-control-center find gnome-shell search providers
|
||||
export GNOME_SEARCH_PROVIDERS_DIR=${config.system.path}/share/gnome-shell/search-providers/
|
||||
|
@ -123,7 +140,7 @@ in {
|
|||
gnome3.gnome_settings_daemon
|
||||
gnome3.gnome_shell
|
||||
gnome3.gnome_themes_standard
|
||||
] ++ (removePackagesByName [
|
||||
] ++ cfg.sessionPath ++ (removePackagesByName [
|
||||
gnome3.baobab
|
||||
gnome3.empathy
|
||||
gnome3.eog
|
||||
|
|
Loading…
Reference in a new issue