2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
xcfg = config.services.xserver;
|
|
|
|
cfg = xcfg.desktopManager.cde;
|
|
|
|
in {
|
|
|
|
options.services.xserver.desktopManager.cde = {
|
2024-04-21 15:54:59 +00:00
|
|
|
enable = mkEnableOption "Common Desktop Environment";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
extraPackages = mkOption {
|
|
|
|
type = with types; listOf package;
|
|
|
|
default = with pkgs.xorg; [
|
|
|
|
xclock bitmap xlsfonts xfd xrefresh xload xwininfo xdpyinfo xwd xwud
|
|
|
|
];
|
2021-10-06 13:57:05 +00:00
|
|
|
defaultText = literalExpression ''
|
2020-05-29 06:06:01 +00:00
|
|
|
with pkgs.xorg; [
|
|
|
|
xclock bitmap xlsfonts xfd xrefresh xload xwininfo xdpyinfo xwd xwud
|
|
|
|
]
|
|
|
|
'';
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2020-05-29 06:06:01 +00:00
|
|
|
Extra packages to be installed system wide.
|
|
|
|
'';
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf (xcfg.enable && cfg.enable) {
|
2020-05-29 06:06:01 +00:00
|
|
|
environment.systemPackages = cfg.extraPackages;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
services.rpcbind.enable = true;
|
|
|
|
|
|
|
|
services.xinetd.enable = true;
|
|
|
|
services.xinetd.services = [
|
|
|
|
{
|
|
|
|
name = "cmsd";
|
|
|
|
protocol = "udp";
|
|
|
|
user = "root";
|
2023-07-15 17:15:38 +00:00
|
|
|
server = "${pkgs.cdesktopenv}/bin/rpc.cmsd";
|
2020-04-24 23:36:52 +00:00
|
|
|
extraConfig = ''
|
|
|
|
type = RPC UNLISTED
|
|
|
|
rpc_number = 100068
|
|
|
|
rpc_version = 2-5
|
|
|
|
only_from = 127.0.0.1/0
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
users.groups.mail = {};
|
|
|
|
security.wrappers = {
|
|
|
|
dtmail = {
|
|
|
|
setgid = true;
|
2021-10-06 13:57:05 +00:00
|
|
|
owner = "root";
|
2021-09-22 15:38:15 +00:00
|
|
|
group = "mail";
|
|
|
|
source = "${pkgs.cdesktopenv}/bin/dtmail";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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 = ''
|
2023-07-15 17:15:38 +00:00
|
|
|
exec ${pkgs.cdesktopenv}/bin/Xsession
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta.maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|