nixpkgs/upstart-jobs/xserver/desktopManager/kde4.nix
Nicolas Pierron bb8fc2646e Substitute the "require" of imported modules by module paths.
$ sed -i '/require =/ { :b; s,(import \([^)]*\)),\1,; /];/ { b e }; n; b b; :e }' *.nix


svn path=/nixos/branches/modular-nixos/; revision=15660
2009-05-19 23:14:45 +00:00

76 lines
1.4 KiB
Nix

{pkgs, config, ...}:
let
inherit (pkgs.lib) mkOption mkIf;
cfg = config.services.xserver.desktopManager.kde4;
xorg = config.services.xserver.package;
options = { services = { xserver = { desktopManager = {
kde4 = {
enable = mkOption {
default = false;
example = true;
description = "Enable the kde 4 desktop manager.";
};
};
}; }; }; };
in
mkIf cfg.enable {
require = [
options
# environment.kdePackages
./kdeEnvironment.nix
];
services = {
xserver = {
desktopManager = {
session = [{
name = "kde4";
start = ''
# Start KDE.
exec ${pkgs.kde42.kdebase_workspace}/bin/startkde
'';
}];
};
};
};
security = {
extraSetuidPrograms = [
"kcheckpass"
];
};
environment = {
kdePackages = [
pkgs.kde42.kdelibs
pkgs.kde42.kdebase
pkgs.kde42.kdebase_runtime
pkgs.kde42.kdebase_workspace
pkgs.shared_mime_info
];
extraPackages = [
xorg.xmessage # so that startkde can show error messages
pkgs.qt4 # needed for qdbus
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";
}
];
};
}