2014-09-15 21:54:02 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2016-03-12 00:43:40 +01:00
|
|
|
e = pkgs.enlightenment;
|
2014-09-15 21:54:02 +02:00
|
|
|
xcfg = config.services.xserver;
|
2016-03-12 00:43:40 +01:00
|
|
|
cfg = xcfg.desktopManager.enlightenment;
|
2016-04-14 17:14:28 +02:00
|
|
|
GST_PLUGIN_PATH = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
|
2015-01-13 12:02:35 +01:00
|
|
|
pkgs.gst_all_1.gst-plugins-base
|
|
|
|
pkgs.gst_all_1.gst-plugins-good
|
|
|
|
pkgs.gst_all_1.gst-plugins-bad
|
|
|
|
pkgs.gst_all_1.gst-libav ];
|
2014-09-15 21:54:02 +02:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
|
2016-03-12 00:43:40 +01:00
|
|
|
services.xserver.desktopManager.enlightenment.enable = mkOption {
|
2014-09-15 21:54:02 +02:00
|
|
|
default = false;
|
2016-03-12 00:43:40 +01:00
|
|
|
description = "Enable the Enlightenment desktop environment.";
|
2014-09-15 21:54:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf (xcfg.enable && cfg.enable) {
|
|
|
|
|
|
|
|
environment.systemPackages = [
|
2016-08-23 00:48:28 +02:00
|
|
|
e.efl e.enlightenment
|
2016-03-12 00:43:40 +01:00
|
|
|
e.terminology e.econnman
|
2014-09-15 21:54:02 +02:00
|
|
|
pkgs.xorg.xauth # used by kdesu
|
2016-09-17 10:09:53 +02:00
|
|
|
pkgs.gtk2 # To get GTK+'s themes.
|
2014-09-15 21:54:02 +02:00
|
|
|
pkgs.tango-icon-theme
|
2018-08-15 10:55:35 +02:00
|
|
|
|
2016-09-17 10:09:53 +02:00
|
|
|
pkgs.gnome2.gnomeicontheme
|
2014-09-15 21:54:02 +02:00
|
|
|
pkgs.xorg.xcursorthemes
|
|
|
|
];
|
|
|
|
|
2018-08-15 10:55:35 +02:00
|
|
|
environment.pathsToLink = [
|
|
|
|
"/etc/enlightenment"
|
|
|
|
"/share/enlightenment"
|
|
|
|
"/share/elementary"
|
|
|
|
"/share/locale"
|
|
|
|
];
|
2014-09-15 21:54:02 +02:00
|
|
|
|
|
|
|
services.xserver.desktopManager.session = [
|
2016-03-12 00:43:40 +01:00
|
|
|
{ name = "Enlightenment";
|
2014-09-15 21:54:02 +02:00
|
|
|
start = ''
|
|
|
|
# Set GTK_DATA_PREFIX so that GTK+ can find the themes
|
|
|
|
export GTK_DATA_PREFIX=${config.system.path}
|
|
|
|
# find theme engines
|
|
|
|
export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
|
2017-12-24 22:31:32 +01:00
|
|
|
export XDG_MENU_PREFIX=e-
|
2014-09-15 21:54:02 +02:00
|
|
|
|
2015-01-13 12:02:35 +01:00
|
|
|
export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}"
|
|
|
|
|
2014-09-15 21:54:02 +02:00
|
|
|
# make available for D-BUS user services
|
2016-03-12 00:43:40 +01:00
|
|
|
#export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}:${config.system.path}/share:${e.efl}/share
|
2014-09-15 21:54:02 +02:00
|
|
|
|
|
|
|
# Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
|
|
|
|
${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update
|
|
|
|
|
2016-03-12 00:53:02 +01:00
|
|
|
exec ${e.enlightenment}/bin/enlightenment_start
|
2014-09-15 21:54:02 +02:00
|
|
|
'';
|
|
|
|
}];
|
|
|
|
|
2018-05-22 22:42:02 +02:00
|
|
|
security.wrappers = (import "${e.enlightenment}/e-wrappers.nix").security.wrappers;
|
2014-09-15 21:54:02 +02:00
|
|
|
|
2017-01-30 14:03:42 +01:00
|
|
|
environment.etc = singleton
|
2017-03-18 22:51:11 +01:00
|
|
|
{ source = xcfg.xkbDir;
|
2017-01-30 14:03:42 +01:00
|
|
|
target = "X11/xkb";
|
|
|
|
};
|
2014-09-15 21:54:02 +02:00
|
|
|
|
|
|
|
fonts.fonts = [ pkgs.dejavu_fonts pkgs.ubuntu_font_family ];
|
|
|
|
|
|
|
|
services.udisks2.enable = true;
|
|
|
|
services.upower.enable = config.powerManagement.enable;
|
|
|
|
|
2016-03-12 00:52:32 +01:00
|
|
|
services.dbus.packages = [ e.efl ];
|
2014-09-15 21:54:02 +02:00
|
|
|
|
|
|
|
systemd.user.services.efreet =
|
|
|
|
{ enable = true;
|
|
|
|
description = "org.enlightenment.Efreet";
|
|
|
|
serviceConfig =
|
2016-03-12 00:43:40 +01:00
|
|
|
{ ExecStart = "${e.efl}/bin/efreetd";
|
2014-09-15 21:54:02 +02:00
|
|
|
StandardOutput = "null";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.services.ethumb =
|
|
|
|
{ enable = true;
|
|
|
|
description = "org.enlightenment.Ethumb";
|
|
|
|
serviceConfig =
|
2016-03-12 00:43:40 +01:00
|
|
|
{ ExecStart = "${e.efl}/bin/ethumbd";
|
2014-09-15 21:54:02 +02:00
|
|
|
StandardOutput = "null";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|