blob: 44c0dbc70fea8b3313128006b4b0d80bb7a85c35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
{ 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
{
meta = {
maintainers = teams.enlightenment.members;
};
imports = [
(mkRenamedOptionModule [ "services" "xserver" "desktopManager" "e19" "enable" ] [ "services" "xserver" "desktopManager" "enlightenment" "enable" ])
];
options = {
services.xserver.desktopManager.enlightenment.enable = mkOption {
type = types.bool;
default = false;
description = "Enable the Enlightenment desktop environment.";
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
enlightenment.econnman
enlightenment.efl
enlightenment.enlightenment
enlightenment.ecrire
enlightenment.ephoto
enlightenment.rage
enlightenment.terminology
xorg.xcursorthemes
];
environment.pathsToLink = [
"/etc/enlightenment"
"/share/enlightenment"
"/share/elementary"
"/share/locale"
];
services.displayManager.sessionPackages = [ pkgs.enlightenment.enlightenment ];
services.xserver.displayManager.sessionCommands = ''
if test "$XDG_CURRENT_DESKTOP" = "Enlightenment"; then
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 https://freedesktop.org/wiki/Software/xdg-user-dirs/
${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update
fi
'';
# Wrappers for programs installed by enlightenment that should be setuid
security.wrappers = {
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";
};
};
environment.etc."X11/xkb".source = xcfg.xkb.dir;
fonts.packages = [ pkgs.dejavu_fonts ];
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
services.libinput.enable = mkDefault true;
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";
};
};
};
}
|