nixpkgs/upstart-jobs/xserver/desktopManager/kde.nix
Nicolas Pierron b2b6f92d6b Split xserver upstart job into:
- xserver configuration & job
- display manager (slim)
- window manager (compiz, kwm, metacity, twm, wmii, xmonad)
- desktop manager (kde, gnome, xterm)

Added features:
- Add WM choice in slim (with F1)

svn path=/nixos/branches/fix-style/; revision=13857
2009-01-25 15:49:08 +00:00

66 lines
1.3 KiB
Nix

{pkgs, config, ...}:
let
inherit (pkgs.lib) mkOption mkIf;
cfg = config.services.xserver.desktopManager.kde;
xorg = config.services.xserver.package;
options = { services = { xserver = { desktopManager = {
kde = {
enable = mkOption {
default = false;
example = true;
description = "Enable the kde desktop manager.";
};
};
}; }; }; };
in
mkIf cfg.enable {
require = options;
services = {
xserver = {
desktopManager = {
session = [{
name = "kde";
start = ''
# Start KDE.
export KDEDIRS=$HOME/.nix-profile:/nix/var/nix/profiles/default:${pkgs.kdebase}:${pkgs.kdelibs}
export XDG_CONFIG_DIRS=${pkgs.kdebase}/etc/xdg:${pkgs.kdelibs}/etc/xdg
export XDG_DATA_DIRS=${pkgs.kdebase}/share
exec ${pkgs.kdebase}/bin/startkde
'';
}];
};
};
};
security = {
extraSetuidPrograms = [
"kcheckpass"
];
};
environment = {
extraPackages = [
pkgs.kdelibs
pkgs.kdebase
xorg.xset # used by startkde, non-essential
];
etc = [
{ source = ../../../etc/pam.d/kde;
target = "pam.d/kde";
}
{ source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
target = "X11/xkb";
}
];
};
}