2009-08-21 12:13:27 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
2009-02-22 17:08:46 +01:00
|
|
|
|
|
|
|
let
|
2009-08-21 12:13:27 +02:00
|
|
|
|
2009-06-26 00:08:03 +02:00
|
|
|
xcfg = config.services.xserver;
|
|
|
|
cfg = xcfg.desktopManager.kde4;
|
2009-09-10 14:37:33 +02:00
|
|
|
xorg = pkgs.xorg;
|
2009-02-22 17:08:46 +01:00
|
|
|
|
2009-08-21 12:13:27 +02:00
|
|
|
in
|
2009-02-22 17:08:46 +01:00
|
|
|
|
2009-08-21 12:13:27 +02:00
|
|
|
{
|
2009-02-22 17:08:46 +01:00
|
|
|
|
2009-08-21 12:13:27 +02:00
|
|
|
imports = [ ./kde-environment.nix ];
|
|
|
|
|
|
|
|
|
|
|
|
options = {
|
2009-02-22 17:08:46 +01:00
|
|
|
|
2009-08-21 12:13:27 +02:00
|
|
|
services.xserver.desktopManager.kde4.enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "Enable the KDE 4 desktop environment.";
|
|
|
|
};
|
2009-04-12 00:12:02 +02:00
|
|
|
|
2009-08-21 12:13:27 +02:00
|
|
|
};
|
2009-02-22 17:08:46 +01:00
|
|
|
|
2009-08-21 12:13:27 +02:00
|
|
|
|
|
|
|
config = mkIf (xcfg.enable && cfg.enable) {
|
2009-02-22 17:08:46 +01:00
|
|
|
|
2009-08-21 15:05:45 +02:00
|
|
|
# If KDE 4 is enabled, make it the default desktop manager (unless
|
2009-08-21 12:13:27 +02:00
|
|
|
# overriden by the user's configuration).
|
|
|
|
# !!! doesn't work yet ("Multiple definitions. Only one is allowed
|
|
|
|
# for this option.")
|
|
|
|
# services.xserver.desktopManager.default = mkOverride 900 "kde4";
|
|
|
|
|
|
|
|
services.xserver.desktopManager.session = singleton
|
|
|
|
{ name = "kde4";
|
|
|
|
bgSupport = true;
|
|
|
|
start =
|
|
|
|
''
|
2009-02-22 17:08:46 +01:00
|
|
|
# Start KDE.
|
2009-09-13 13:09:58 +02:00
|
|
|
exec ${pkgs.kde4.kdebase_workspace}/bin/startkde
|
2009-02-22 17:08:46 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2009-08-21 12:13:27 +02:00
|
|
|
security.setuidPrograms = [ "kcheckpass" ];
|
2009-02-22 17:08:46 +01:00
|
|
|
|
2009-08-21 12:13:27 +02:00
|
|
|
environment.kdePackages =
|
2009-09-13 13:09:58 +02:00
|
|
|
[ pkgs.kde4.kdelibs
|
|
|
|
pkgs.kde4.kdebase
|
|
|
|
pkgs.kde4.kdebase_runtime
|
|
|
|
pkgs.kde4.kdebase_workspace
|
2009-08-21 12:13:27 +02:00
|
|
|
pkgs.shared_mime_info
|
2010-03-03 14:22:06 +01:00
|
|
|
pkgs.gst_all.gstreamer
|
|
|
|
pkgs.gst_all.gstPluginsBase
|
|
|
|
pkgs.gst_all.gstPluginsGood
|
2009-09-13 13:09:58 +02:00
|
|
|
] ++ optional (pkgs.kde4 ? oxygen_icons) pkgs.kde4.oxygen_icons;
|
2009-02-22 17:08:46 +01:00
|
|
|
|
2009-08-21 12:13:27 +02:00
|
|
|
environment.x11Packages =
|
|
|
|
[ xorg.xmessage # so that startkde can show error messages
|
2009-09-13 13:09:58 +02:00
|
|
|
pkgs.kde4.qt4 # needed for qdbus
|
2009-08-21 12:13:27 +02:00
|
|
|
xorg.xset # used by startkde, non-essential
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.etc = singleton
|
2009-02-22 17:08:46 +01:00
|
|
|
{ source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
|
|
|
|
target = "X11/xkb";
|
2009-08-21 12:13:27 +02:00
|
|
|
};
|
|
|
|
|
2009-02-22 17:08:46 +01:00
|
|
|
};
|
2009-08-21 12:13:27 +02:00
|
|
|
|
2009-02-22 17:08:46 +01:00
|
|
|
}
|