2014-09-15 20:54:02 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2016-03-11 23:43:40 +00:00
|
|
|
e = pkgs.enlightenment;
|
2014-09-15 20:54:02 +01:00
|
|
|
xcfg = config.services.xserver;
|
2016-03-11 23:43:40 +00:00
|
|
|
cfg = xcfg.desktopManager.enlightenment;
|
2016-04-14 16:14:28 +01:00
|
|
|
GST_PLUGIN_PATH = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
|
2015-01-13 11:02:35 +00: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 20:54:02 +01:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
|
2016-03-11 23:43:40 +00:00
|
|
|
services.xserver.desktopManager.enlightenment.enable = mkOption {
|
2014-09-15 20:54:02 +01:00
|
|
|
default = false;
|
2016-03-11 23:43:40 +00:00
|
|
|
description = "Enable the Enlightenment desktop environment.";
|
2014-09-15 20:54:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2019-05-13 05:12:00 +01:00
|
|
|
config = mkIf cfg.enable {
|
2014-09-15 20:54:02 +01:00
|
|
|
|
|
|
|
environment.systemPackages = [
|
2016-08-22 23:48:28 +01:00
|
|
|
e.efl e.enlightenment
|
2016-03-11 23:43:40 +00:00
|
|
|
e.terminology e.econnman
|
2014-09-15 20:54:02 +01:00
|
|
|
pkgs.xorg.xauth # used by kdesu
|
2016-09-17 09:09:53 +01:00
|
|
|
pkgs.gtk2 # To get GTK+'s themes.
|
2014-09-15 20:54:02 +01:00
|
|
|
pkgs.tango-icon-theme
|
2018-08-15 09:55:35 +01:00
|
|
|
|
2019-05-13 04:50:52 +01:00
|
|
|
pkgs.gnome2.gnome_icon_theme
|
2014-09-15 20:54:02 +01:00
|
|
|
pkgs.xorg.xcursorthemes
|
|
|
|
];
|
|
|
|
|
2019-05-13 05:12:00 +01:00
|
|
|
environment.pathsToLink = [
|
|
|
|
"/etc/enlightenment"
|
|
|
|
"/share/enlightenment"
|
|
|
|
"/share/elementary"
|
2018-08-15 09:55:35 +01:00
|
|
|
"/share/locale"
|
|
|
|
];
|
2014-09-15 20:54:02 +01:00
|
|
|
|
|
|
|
services.xserver.desktopManager.session = [
|
2016-03-11 23:43:40 +00:00
|
|
|
{ name = "Enlightenment";
|
2014-09-15 20:54:02 +01: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 21:31:32 +00:00
|
|
|
export XDG_MENU_PREFIX=e-
|
2014-09-15 20:54:02 +01:00
|
|
|
|
2015-01-13 11:02:35 +00:00
|
|
|
export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}"
|
|
|
|
|
2014-09-15 20:54:02 +01:00
|
|
|
# make available for D-BUS user services
|
2016-03-11 23:43:40 +00:00
|
|
|
#export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}:${config.system.path}/share:${e.efl}/share
|
2014-09-15 20:54:02 +01: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-11 23:53:02 +00:00
|
|
|
exec ${e.enlightenment}/bin/enlightenment_start
|
2014-09-15 20:54:02 +01:00
|
|
|
'';
|
|
|
|
}];
|
|
|
|
|
2018-05-22 21:42:02 +01:00
|
|
|
security.wrappers = (import "${e.enlightenment}/e-wrappers.nix").security.wrappers;
|
2014-09-15 20:54:02 +01:00
|
|
|
|
2017-01-30 13:03:42 +00:00
|
|
|
environment.etc = singleton
|
2017-03-18 21:51:11 +00:00
|
|
|
{ source = xcfg.xkbDir;
|
2017-01-30 13:03:42 +00:00
|
|
|
target = "X11/xkb";
|
|
|
|
};
|
2014-09-15 20:54:02 +01:00
|
|
|
|
|
|
|
fonts.fonts = [ pkgs.dejavu_fonts pkgs.ubuntu_font_family ];
|
|
|
|
|
|
|
|
services.udisks2.enable = true;
|
|
|
|
services.upower.enable = config.powerManagement.enable;
|
|
|
|
|
2016-03-11 23:52:32 +00:00
|
|
|
services.dbus.packages = [ e.efl ];
|
2014-09-15 20:54:02 +01:00
|
|
|
|
|
|
|
systemd.user.services.efreet =
|
|
|
|
{ enable = true;
|
|
|
|
description = "org.enlightenment.Efreet";
|
|
|
|
serviceConfig =
|
2016-03-11 23:43:40 +00:00
|
|
|
{ ExecStart = "${e.efl}/bin/efreetd";
|
2014-09-15 20:54:02 +01:00
|
|
|
StandardOutput = "null";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.services.ethumb =
|
|
|
|
{ enable = true;
|
|
|
|
description = "org.enlightenment.Ethumb";
|
|
|
|
serviceConfig =
|
2016-03-11 23:43:40 +00:00
|
|
|
{ ExecStart = "${e.efl}/bin/ethumbd";
|
2014-09-15 20:54:02 +01:00
|
|
|
StandardOutput = "null";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|