diff --git a/modules/config/system-path.nix b/modules/config/system-path.nix index 03256aa9596e..69466674b70a 100644 --- a/modules/config/system-path.nix +++ b/modules/config/system-path.nix @@ -97,11 +97,16 @@ let paths = list; inherit (cfg) pathsToLink; ignoreCollisions = true; + # !!! Hacky, should modularise. postBuild = '' if [ -x $out/bin/update-mime-database -a -d $out/share/mime/packages ]; then $out/bin/update-mime-database -V $out/share/mime fi + + if [ -x $out/bin/gtk-update-icon-cache -a -d $out/share/icons/hicolor ]; then + $out/bin/gtk-update-icon-cache $out/share/icons/hicolor + fi ''; }; diff --git a/modules/services/x11/desktop-managers/xfce.nix b/modules/services/x11/desktop-managers/xfce.nix index 10457a2eeb65..4508820f2712 100644 --- a/modules/services/x11/desktop-managers/xfce.nix +++ b/modules/services/x11/desktop-managers/xfce.nix @@ -28,23 +28,46 @@ in bgSupport = true; start = '' + # Set GTK_PATH so that GTK+ can find the Xfce theme engine. + export GTK_PATH=${pkgs.xfce.gtk_xfce_engine}/lib/gtk-2.0 + + # Set GTK_DATA_PREFIX so that GTK+ can find the Xfce themes. + export GTK_DATA_PREFIX=${config.system.path} + exec ${pkgs.stdenv.shell} ${pkgs.xfce.xfceutils}/etc/xdg/xfce4/xinitrc ''; }; environment.systemPackages = [ + pkgs.gtkLibs.gtk # To get GTK+'s themes. + pkgs.hicolor_icon_theme + pkgs.shared_mime_info pkgs.which # Needed by the xfce's xinitrc script. pkgs.xfce.exo + pkgs.xfce.gtk_xfce_engine + pkgs.xfce.libxfcegui4 # For the icons. + pkgs.xfce.mousepad + pkgs.xfce.ristretto pkgs.xfce.terminal + pkgs.xfce.thunar + pkgs.xfce.xfce4icontheme pkgs.xfce.xfce4panel pkgs.xfce.xfce4session + pkgs.xfce.xfce4settings pkgs.xfce.xfceutils pkgs.xfce.xfconf pkgs.xfce.xfdesktop pkgs.xfce.xfwm4 + + # This supplies some "abstract" icons such as + # "utilities-terminal" and "accessories-text-editor". + pkgs.gnome.gnomeicontheme ]; + environment.pathsToLink = + [ "/share/xfce4" "/share/themes" "/share/mime" ]; + }; }