nixpkgs/modules/services/x11/xserver/desktop-managers/kde-environment.nix
Eelco Dolstra f1fb3b45cf * No camelCase in filenames. Also pluralise the *-manager directories
for consistency.

svn path=/nixos/branches/modular-nixos/; revision=15719
2009-05-25 09:02:29 +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}"
'';
};
}