the conversion procedure is simple: - find all things that look like options, ie calls to either `mkOption` or `lib.mkOption` that take an attrset. remember the attrset as the option - for all options, find a `description` attribute who's value is not a call to `mdDoc` or `lib.mdDoc` - textually convert the entire value of the attribute to MD with a few simple regexes (the set from mdize-module.sh) - if the change produced a change in the manual output, discard - if the change kept the manual unchanged, add some text to the description to make sure we've actually found an option. if the manual changes this time, keep the converted description this procedure converts 80% of nixos options to markdown. around 2000 options remain to be inspected, but most of those fail the "does not change the manual output check": currently the MD conversion process does not faithfully convert docbook tags like <code> and <package>, so any option using such tags will not be converted at all.
125 lines
3.4 KiB
Nix
125 lines
3.4 KiB
Nix
{ 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 = lib.mdDoc "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.xserver.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 http://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.xkbDir;
|
|
|
|
fonts.fonts = [ pkgs.dejavu_fonts pkgs.ubuntu_font_family ];
|
|
|
|
services.udisks2.enable = true;
|
|
services.upower.enable = config.powerManagement.enable;
|
|
services.xserver.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";
|
|
};
|
|
};
|
|
|
|
|
|
};
|
|
|
|
}
|