nixpkgs/modules/services/x11/xserver/desktopManager/kdeEnvironment.nix
Eelco Dolstra 5ebdee3577 * Continued refactoring the tree: moved most Upstart jobs (namely
those that run daemons) to modules/services.  This probably broke
  some things since there are a few relative paths in modules
  (e.g. imports of system/ids.nix).
* Moved some PAM modules out of etc/pam.d to the directories of NixOS
  modules that use them.

svn path=/nixos/branches/modular-nixos/; revision=15717
2009-05-24 23:13:23 +00:00

52 lines
1.3 KiB
Nix

{pkgs, config, ...}:
let
inherit (pkgs.lib) mkOption mkIf;
kdePackages = config.environment.kdePackages;
options = {
kde = {
extraPackages = mkOption {
default = [];
merge = builtins.trace "!!! kde.extraPackages is obsolete, you should use environment.kdePackages." pkgs.lib.mergeDefaultOption;
description = ''
** Obsolete **
Additional KDE packages to be used when you use KDE as a desktop
manager. By default, you only get the KDE base packages.
'';
};
};
environment = {
kdePackages = mkOption {
default = [];
example = [ pkgs.kde42.kdegames ];
description = ''
Additional KDE packages to be used when you use KDE as a desktop
manager. By default, you only get the KDE base packages.
'';
apply = pkgs: pkgs ++ config.kde.extraPackages;
};
};
};
in
mkIf (kdePackages != []) {
require = options;
environment = {
extraPackages = 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}"
'';
};
}