2009-01-25 16:49:08 +01:00
|
|
|
{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 {
|
2009-04-12 00:12:02 +02:00
|
|
|
require = [
|
|
|
|
options
|
|
|
|
|
|
|
|
# environment.kdePackages
|
|
|
|
(import ./kdeEnvironment.nix)
|
|
|
|
];
|
2009-01-25 16:49:08 +01:00
|
|
|
|
|
|
|
services = {
|
|
|
|
xserver = {
|
|
|
|
|
|
|
|
desktopManager = {
|
|
|
|
session = [{
|
|
|
|
name = "kde";
|
|
|
|
start = ''
|
|
|
|
# Start KDE.
|
|
|
|
exec ${pkgs.kdebase}/bin/startkde
|
|
|
|
'';
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
security = {
|
|
|
|
extraSetuidPrograms = [
|
|
|
|
"kcheckpass"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
environment = {
|
2009-04-12 00:12:02 +02:00
|
|
|
kdePackages = [
|
2009-01-25 16:49:08 +01:00
|
|
|
pkgs.kdelibs
|
|
|
|
pkgs.kdebase
|
2009-04-12 00:12:02 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
extraPackages = [
|
2009-01-25 16:49:08 +01:00
|
|
|
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";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|