1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 09:53:17 +00:00
nixpkgs/modules/services/x11/desktop-managers/kde-environment.nix
Eelco Dolstra bc95e0fdf9 * Simplified the X server directory structure: x11/xserver/* -> x11/.
svn path=/nixos/trunk/; revision=17005
2009-09-10 12:50:58 +00:00

53 lines
1.3 KiB
Nix

{pkgs, config, ...}:
let
inherit (pkgs.lib) mkOption mkIf types;
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 ];
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.
'';
apply = pkgs: pkgs ++ config.kde.extraPackages;
};
};
};
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}"
'';
};
}