2020-04-24 23:36:52 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
e = pkgs.enlightenment;
|
|
|
|
xcfg = config.services.xserver;
|
|
|
|
cfg = xcfg.desktopManager.enlightenment;
|
|
|
|
GST_PLUGIN_PATH = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
|
|
|
|
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 ];
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2022-04-27 09:35:20 +00:00
|
|
|
meta = {
|
|
|
|
maintainers = teams.enlightenment.members;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
imports = [
|
|
|
|
(mkRenamedOptionModule [ "services" "xserver" "desktopManager" "e19" "enable" ] [ "services" "xserver" "desktopManager" "enlightenment" "enable" ])
|
|
|
|
];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.xserver.desktopManager.enlightenment.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc "Enable the Enlightenment desktop environment.";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
enlightenment.econnman
|
|
|
|
enlightenment.efl
|
|
|
|
enlightenment.enlightenment
|
2022-01-07 04:07:37 +00:00
|
|
|
enlightenment.ecrire
|
2020-05-29 06:06:01 +00:00
|
|
|
enlightenment.ephoto
|
|
|
|
enlightenment.rage
|
|
|
|
enlightenment.terminology
|
|
|
|
xorg.xcursorthemes
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
environment.pathsToLink = [
|
|
|
|
"/etc/enlightenment"
|
|
|
|
"/share/enlightenment"
|
|
|
|
"/share/elementary"
|
|
|
|
"/share/locale"
|
|
|
|
];
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
services.xserver.displayManager.sessionPackages = [ pkgs.enlightenment.enlightenment ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
services.xserver.displayManager.sessionCommands = ''
|
|
|
|
if test "$XDG_CURRENT_DESKTOP" = "Enlightenment"; then
|
2020-04-24 23:36:52 +00:00
|
|
|
export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}"
|
|
|
|
|
|
|
|
# make available for D-BUS user services
|
|
|
|
#export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}:${config.system.path}/share:${e.efl}/share
|
|
|
|
|
|
|
|
# Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
|
|
|
|
${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update
|
2020-05-29 06:06:01 +00:00
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Wrappers for programs installed by enlightenment that should be setuid
|
|
|
|
security.wrappers = {
|
2021-09-22 15:38:15 +00:00
|
|
|
enlightenment_ckpasswd =
|
|
|
|
{ setuid = true;
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
source = "${pkgs.enlightenment.enlightenment}/lib/enlightenment/utils/enlightenment_ckpasswd";
|
|
|
|
};
|
|
|
|
enlightenment_sys =
|
|
|
|
{ setuid = true;
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
source = "${pkgs.enlightenment.enlightenment}/lib/enlightenment/utils/enlightenment_sys";
|
|
|
|
};
|
|
|
|
enlightenment_system =
|
|
|
|
{ setuid = true;
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
source = "${pkgs.enlightenment.enlightenment}/lib/enlightenment/utils/enlightenment_system";
|
|
|
|
};
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
environment.etc."X11/xkb".source = xcfg.xkbDir;
|
|
|
|
|
|
|
|
fonts.fonts = [ pkgs.dejavu_fonts pkgs.ubuntu_font_family ];
|
|
|
|
|
|
|
|
services.udisks2.enable = true;
|
|
|
|
services.upower.enable = config.powerManagement.enable;
|
2022-04-27 09:35:20 +00:00
|
|
|
services.xserver.libinput.enable = mkDefault true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
services.dbus.packages = [ e.efl ];
|
|
|
|
|
|
|
|
systemd.user.services.efreet =
|
|
|
|
{ enable = true;
|
|
|
|
description = "org.enlightenment.Efreet";
|
|
|
|
serviceConfig =
|
|
|
|
{ ExecStart = "${e.efl}/bin/efreetd";
|
|
|
|
StandardOutput = "null";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.services.ethumb =
|
|
|
|
{ enable = true;
|
|
|
|
description = "org.enlightenment.Ethumb";
|
|
|
|
serviceConfig =
|
|
|
|
{ ExecStart = "${e.efl}/bin/ethumbd";
|
|
|
|
StandardOutput = "null";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|