nixpkgs/modules/services/x11/desktop-managers/kde-environment.nix
Nicolas Pierron 9b5611e35e Option "kde.extraPackages" is now deprecated.
svn path=/nixos/trunk/; revision=17682
2009-10-06 19:25:25 +00:00

38 lines
886 B
Nix

{pkgs, config, ...}:
let
inherit (pkgs.lib) mkOption mkIf types;
kdePackages = config.environment.kdePackages;
options = {
environment = {
kdePackages = mkOption {
default = [];
example = [ pkgs.kde4.kdegames ];
type = types.list types.package;
description = ''
Additional KDE packages to be used when you use KDE as a desktop
manager. By default, you only get the KDE base packages.
'';
};
};
};
in
mkIf (kdePackages != [] && config.services.xserver.enable) {
require = options;
environment = {
x11Packages = kdePackages;
shellInit = ''
export KDEDIRS="${pkgs.lib.concatStringsSep ":" kdePackages}"
export XDG_CONFIG_DIRS="${pkgs.lib.makeSearchPath "etc/xdg" kdePackages}"
export XDG_DATA_DIRS="${pkgs.lib.makeSearchPath "share" kdePackages}"
'';
};
}