git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/environment: set GTK_DATA_PREFIX

Many desktop environment modules are already setting this so it already makes sense to just do this globally.

commitcc125810cb4f305c5bcee937648ff3704f13c472 authorworldofpeace <worldofpeace@protonmail.ch> dateThu 12 Sep 2019, 16:20 (7 years ago) parent5669b06
7 files changed+2−32
nixos/modules/programs/environment.nix+1 nixos/modules/services/editors/emacs.nix+1−7 nixos/modules/services/x11/desktop-managers/enlightenment.nix−4 nixos/modules/services/x11/desktop-managers/mate.nix−6 nixos/modules/services/x11/desktop-managers/xfce.nix−6 nixos/modules/services/x11/desktop-managers/xfce4-14.nix−6 pkgs/misc/themes/clearlooks-phenix/default.nix−3
nixos/modules/programs/environment.nix+1
@@ -22,6 +22,7 @@ in
2222 EDITOR = mkDefault "nano";
2323 XCURSOR_PATH = [ "$HOME/.icons" ];
2424 XDG_CONFIG_DIRS = [ "/etc/xdg" ]; # needs to be before profile-relative paths to allow changes through environment.etc
25+ GTK_DATA_PREFIX = "${config.system.path}"; # needed for gtk2 apps to find themes
2526 };
2627
2728 environment.profiles = mkAfter
nixos/modules/services/editors/emacs.nix+1−7
@@ -95,13 +95,7 @@ in {
9595
9696 environment.systemPackages = [ cfg.package editorScript desktopApplicationFile ];
9797
98− environment.variables = {
99− # This is required so that GTK applications launched from Emacs
100− # get properly themed:
101− GTK_DATA_PREFIX = "${config.system.path}";
102− } // (if cfg.defaultEditor then {
103− EDITOR = mkOverride 900 "${editorScript}/bin/emacseditor";
104− } else {});
98+ environment.variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "${editorScript}/bin/emacseditor");
10599 };
106100
107101 meta.doc = ./emacs.xml;
nixos/modules/services/x11/desktop-managers/enlightenment.nix−4
@@ -48,10 +48,6 @@ in
4848 services.xserver.desktopManager.session = [
4949 { name = "Enlightenment";
5050 start = ''
51− # Set GTK_DATA_PREFIX so that GTK can find the themes
52− export GTK_DATA_PREFIX=${config.system.path}
53− # find theme engines
54− export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
5551 export XDG_MENU_PREFIX=e-
5652
5753 export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}"
nixos/modules/services/x11/desktop-managers/mate.nix−6
@@ -48,12 +48,6 @@ in
4848 name = "mate";
4949 bgSupport = true;
5050 start = ''
51− # Set GTK_DATA_PREFIX so that GTK can find the themes
52− export GTK_DATA_PREFIX=${config.system.path}
53−
54− # Find theme engines
55− export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
56−
5751 export XDG_MENU_PREFIX=mate-
5852
5953 # Let caja find extensions
nixos/modules/services/x11/desktop-managers/xfce.nix−6
@@ -107,12 +107,6 @@ in
107107 start = ''
108108 ${cfg.extraSessionCommands}
109109
110− # Set GTK_PATH so that GTK can find the theme engines.
111− export GTK_PATH="${config.system.path}/lib/gtk-2.0:${config.system.path}/lib/gtk-3.0"
112−
113− # Set GTK_DATA_PREFIX so that GTK can find the Xfce themes.
114− export GTK_DATA_PREFIX=${config.system.path}
115−
116110 ${pkgs.runtimeShell} ${pkgs.xfce.xinitrc} &
117111 waitPID=$!
118112 '';
nixos/modules/services/x11/desktop-managers/xfce4-14.nix−6
@@ -114,12 +114,6 @@ in
114114 name = "xfce4-14";
115115 bgSupport = true;
116116 start = ''
117− # Set GTK_PATH so that GTK can find the theme engines.
118− export GTK_PATH="${config.system.path}/lib/gtk-2.0:${config.system.path}/lib/gtk-3.0"
119−
120− # Set GTK_DATA_PREFIX so that GTK can find the Xfce themes.
121− export GTK_DATA_PREFIX=${config.system.path}
122−
123117 ${pkgs.runtimeShell} ${pkgs.xfce4-14.xinitrc} &
124118 waitPID=$!
125119 '';
pkgs/misc/themes/clearlooks-phenix/default.nix−3
@@ -23,9 +23,6 @@ stdenv.mkDerivation rec {
2323 The Clearlooks-Phénix project aims at creating a GTK3 port of Clearlooks,
2424 the default theme for Gnome 2. Style is also included for GTK2, Unity and
2525 for Metacity, Openbox and Xfwm4 window managers.
26−
27− You should install this theme into your user profile and then set
28− GTK_DATA_PREFIX to `~/.nix-profile`.
2926 '';
3027 homepage = https://github.com/jpfleury/clearlooks-phenix;
3128 downloadPage = https://github.com/jpfleury/clearlooks-phenix/releases;