2009-02-22 17:08:46 +01:00
|
|
|
{pkgs, config, ...}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs.lib) mkOption mkIf;
|
2009-02-23 00:33:53 +01:00
|
|
|
cfg = config.services.xserver.desktopManager.kde4;
|
2009-02-22 17:08:46 +01:00
|
|
|
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 {
|
2009-04-12 00:12:02 +02:00
|
|
|
require = [
|
|
|
|
options
|
|
|
|
|
|
|
|
# environment.kdePackages
|
2009-05-20 01:14:45 +02:00
|
|
|
./kdeEnvironment.nix
|
2009-04-12 00:12:02 +02:00
|
|
|
];
|
2009-02-22 17:08:46 +01:00
|
|
|
|
|
|
|
services = {
|
|
|
|
xserver = {
|
|
|
|
|
|
|
|
desktopManager = {
|
|
|
|
session = [{
|
|
|
|
name = "kde4";
|
|
|
|
start = ''
|
|
|
|
# Start KDE.
|
|
|
|
exec ${pkgs.kde42.kdebase_workspace}/bin/startkde
|
|
|
|
'';
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
security = {
|
|
|
|
extraSetuidPrograms = [
|
|
|
|
"kcheckpass"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
environment = {
|
2009-04-12 00:12:02 +02:00
|
|
|
kdePackages = [
|
2009-02-22 17:08:46 +01:00
|
|
|
pkgs.kde42.kdelibs
|
|
|
|
pkgs.kde42.kdebase
|
|
|
|
pkgs.kde42.kdebase_runtime
|
|
|
|
pkgs.kde42.kdebase_workspace
|
2009-02-22 17:09:14 +01:00
|
|
|
pkgs.shared_mime_info
|
2009-04-12 00:12:02 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
extraPackages = [
|
|
|
|
xorg.xmessage # so that startkde can show error messages
|
|
|
|
pkgs.qt4 # needed for qdbus
|
2009-02-22 17:08:46 +01:00
|
|
|
xorg.xset # used by startkde, non-essential
|
|
|
|
];
|
|
|
|
|
|
|
|
etc = [
|
2009-05-25 01:13:23 +02:00
|
|
|
{ source = ./kde.pam;
|
2009-02-22 17:08:46 +01:00
|
|
|
target = "pam.d/kde";
|
|
|
|
}
|
|
|
|
{ source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
|
|
|
|
target = "X11/xkb";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|