vuls: init at 0.27.0
[NixPkgs.git] / nixos / modules / services / x11 / desktop-managers / enlightenment.nix
blob44c0dbc70fea8b3313128006b4b0d80bb7a85c35
1 { config, pkgs, lib, ... }:
3 with lib;
5 let
7   e = pkgs.enlightenment;
8   xcfg = config.services.xserver;
9   cfg = xcfg.desktopManager.enlightenment;
10   GST_PLUGIN_PATH = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
11     pkgs.gst_all_1.gst-plugins-base
12     pkgs.gst_all_1.gst-plugins-good
13     pkgs.gst_all_1.gst-plugins-bad
14     pkgs.gst_all_1.gst-libav ];
19   meta = {
20     maintainers = teams.enlightenment.members;
21   };
23   imports = [
24     (mkRenamedOptionModule [ "services" "xserver" "desktopManager" "e19" "enable" ] [ "services" "xserver" "desktopManager" "enlightenment" "enable" ])
25   ];
27   options = {
29     services.xserver.desktopManager.enlightenment.enable = mkOption {
30       type = types.bool;
31       default = false;
32       description = "Enable the Enlightenment desktop environment.";
33     };
35   };
37   config = mkIf cfg.enable {
39     environment.systemPackages = with pkgs; [
40       enlightenment.econnman
41       enlightenment.efl
42       enlightenment.enlightenment
43       enlightenment.ecrire
44       enlightenment.ephoto
45       enlightenment.rage
46       enlightenment.terminology
47       xorg.xcursorthemes
48     ];
50     environment.pathsToLink = [
51       "/etc/enlightenment"
52       "/share/enlightenment"
53       "/share/elementary"
54       "/share/locale"
55     ];
57     services.displayManager.sessionPackages = [ pkgs.enlightenment.enlightenment ];
59     services.xserver.displayManager.sessionCommands = ''
60       if test "$XDG_CURRENT_DESKTOP" = "Enlightenment"; then
61         export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}"
63         # make available for D-BUS user services
64         #export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}:${config.system.path}/share:${e.efl}/share
66         # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
67         ${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update
68       fi
69     '';
71     # Wrappers for programs installed by enlightenment that should be setuid
72     security.wrappers = {
73       enlightenment_ckpasswd =
74         { setuid = true;
75           owner = "root";
76           group = "root";
77           source = "${pkgs.enlightenment.enlightenment}/lib/enlightenment/utils/enlightenment_ckpasswd";
78         };
79       enlightenment_sys =
80         { setuid = true;
81           owner = "root";
82           group = "root";
83           source = "${pkgs.enlightenment.enlightenment}/lib/enlightenment/utils/enlightenment_sys";
84         };
85       enlightenment_system =
86         { setuid = true;
87           owner = "root";
88           group = "root";
89           source = "${pkgs.enlightenment.enlightenment}/lib/enlightenment/utils/enlightenment_system";
90         };
91     };
93     environment.etc."X11/xkb".source = xcfg.xkb.dir;
95     fonts.packages = [ pkgs.dejavu_fonts ];
97     services.udisks2.enable = true;
98     services.upower.enable = config.powerManagement.enable;
99     services.libinput.enable = mkDefault true;
101     services.dbus.packages = [ e.efl ];
103     systemd.user.services.efreet =
104       { enable = true;
105         description = "org.enlightenment.Efreet";
106         serviceConfig =
107           { ExecStart = "${e.efl}/bin/efreetd";
108             StandardOutput = "null";
109           };
110       };
112     systemd.user.services.ethumb =
113       { enable = true;
114         description = "org.enlightenment.Ethumb";
115         serviceConfig =
116           { ExecStart = "${e.efl}/bin/ethumbd";
117             StandardOutput = "null";
118           };
119       };
122   };