2019-12-07 10:19:10 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
xcfg = config.services.xserver;
|
|
|
|
cfg = xcfg.desktopManager.cde;
|
|
|
|
in {
|
|
|
|
options.services.xserver.desktopManager.cde = {
|
|
|
|
enable = mkEnableOption "Common Desktop Environment";
|
2020-05-24 13:59:49 +01:00
|
|
|
|
|
|
|
extraPackages = mkOption {
|
|
|
|
type = with types; listOf package;
|
|
|
|
default = with pkgs.xorg; [
|
|
|
|
xclock bitmap xlsfonts xfd xrefresh xload xwininfo xdpyinfo xwd xwud
|
|
|
|
];
|
|
|
|
example = literalExample ''
|
|
|
|
with pkgs.xorg; [
|
|
|
|
xclock bitmap xlsfonts xfd xrefresh xload xwininfo xdpyinfo xwd xwud
|
|
|
|
]
|
|
|
|
'';
|
|
|
|
description = ''
|
|
|
|
Extra packages to be installed system wide.
|
|
|
|
'';
|
|
|
|
};
|
2019-12-07 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf (xcfg.enable && cfg.enable) {
|
2020-05-24 13:59:49 +01:00
|
|
|
environment.systemPackages = cfg.extraPackages;
|
|
|
|
|
2019-12-07 10:19:10 +00:00
|
|
|
services.rpcbind.enable = true;
|
|
|
|
|
|
|
|
services.xinetd.enable = true;
|
|
|
|
services.xinetd.services = [
|
|
|
|
{
|
|
|
|
name = "cmsd";
|
|
|
|
protocol = "udp";
|
|
|
|
user = "root";
|
|
|
|
server = "${pkgs.cdesktopenv}/opt/dt/bin/rpc.cmsd";
|
|
|
|
extraConfig = ''
|
|
|
|
type = RPC UNLISTED
|
|
|
|
rpc_number = 100068
|
|
|
|
rpc_version = 2-5
|
|
|
|
only_from = 127.0.0.1/0
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
users.groups.mail = {};
|
|
|
|
security.wrappers = {
|
|
|
|
dtmail = {
|
|
|
|
source = "${pkgs.cdesktopenv}/bin/dtmail";
|
|
|
|
group = "mail";
|
|
|
|
setgid = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
system.activationScripts.setup-cde = ''
|
|
|
|
mkdir -p /var/dt/{tmp,appconfig/appmanager}
|
|
|
|
chmod a+w+t /var/dt/{tmp,appconfig/appmanager}
|
|
|
|
'';
|
|
|
|
|
|
|
|
services.xserver.desktopManager.session = [
|
|
|
|
{ name = "CDE";
|
|
|
|
start = ''
|
|
|
|
exec ${pkgs.cdesktopenv}/opt/dt/bin/Xsession
|
|
|
|
'';
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
2021-04-29 06:21:13 +01:00
|
|
|
meta.maintainers = [ ];
|
2019-12-07 10:19:10 +00:00
|
|
|
}
|