depot/third_party/nixpkgs/nixos/modules/services/x11/desktop-managers/cde.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

55 lines
1.2 KiB
Nix

{ 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";
};
config = mkIf (xcfg.enable && cfg.enable) {
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
'';
}];
};
meta.maintainers = [ maintainers.gnidorah ];
}