Replace extraPackages by x11Packages for all windows/desktop managers.
-> No longer install graphical packages if the xserver is disabled. -> avoid duplication of "mkIf config.services.xserver.enable". svn path=/nixos/branches/modular-nixos/; revision=16044
This commit is contained in:
parent
b701207ead
commit
6e802e5d75
@ -277,6 +277,15 @@ let
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
environment.x11Packages = mkOption {
|
||||
default = [];
|
||||
type = types.list types.packages;
|
||||
description = "
|
||||
List of packages added to the system when the xserver is
|
||||
activated. (<option>services.xserver.enable</option>).
|
||||
";
|
||||
};
|
||||
};
|
||||
in
|
||||
|
||||
@ -505,7 +514,7 @@ mkIf cfg.enable {
|
||||
}
|
||||
];
|
||||
|
||||
extraPackages = [
|
||||
x11Packages = [
|
||||
xorg.xrandr
|
||||
xorg.xrdb
|
||||
xorg.setxkbmap
|
||||
@ -514,6 +523,8 @@ mkIf cfg.enable {
|
||||
++ optional (videoDriver == "nvidia") [
|
||||
kernelPackages.nvidia_x11
|
||||
];
|
||||
|
||||
extraPackages = config.environment.x11Packages;
|
||||
};
|
||||
|
||||
services = {
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
let
|
||||
inherit (pkgs.lib) mkOption mergeOneOption mkIf filter optionalString any;
|
||||
cfg = config.services.xserver.desktopManager;
|
||||
xcfg = config.services.xserver;
|
||||
cfg = xcfg.desktopManager;
|
||||
|
||||
# Whether desktop manager `d' is capable of setting a background.
|
||||
# If it isn't, the `feh' program is used as a fallback.
|
||||
@ -69,7 +70,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
environment = mkIf (config.services.xserver.enable && cfg.session.needBGPackages) {
|
||||
extraPackages = [ pkgs.feh ];
|
||||
environment = mkIf cfg.session.needBGPackages {
|
||||
x11Packages = [ pkgs.feh ];
|
||||
};
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ mkIf cfg.enable {
|
||||
};
|
||||
|
||||
environment = {
|
||||
extraPackages = [
|
||||
x11Packages = [
|
||||
gnome.gnometerminal
|
||||
gnome.GConf
|
||||
gnome.gconfeditor
|
||||
|
@ -1,7 +1,7 @@
|
||||
{pkgs, config, ...}:
|
||||
|
||||
let
|
||||
inherit (pkgs.lib) mkOption mkIf;
|
||||
inherit (pkgs.lib) mkOption mkIf types;
|
||||
kdePackages = config.environment.kdePackages;
|
||||
|
||||
options = {
|
||||
@ -25,6 +25,7 @@ let
|
||||
kdePackages = mkOption {
|
||||
default = [];
|
||||
example = [ pkgs.kde42.kdegames ];
|
||||
type = types.list types.packages;
|
||||
description = ''
|
||||
Additional KDE packages to be used when you use KDE as a desktop
|
||||
manager. By default, you only get the KDE base packages.
|
||||
@ -36,11 +37,11 @@ let
|
||||
};
|
||||
in
|
||||
|
||||
mkIf (kdePackages != []) {
|
||||
mkIf (kdePackages != [] && config.services.xserver.enable) {
|
||||
require = options;
|
||||
|
||||
environment = {
|
||||
extraPackages = kdePackages;
|
||||
x11Packages = kdePackages;
|
||||
|
||||
shellInit = ''
|
||||
export KDEDIRS="${pkgs.lib.concatStringsSep ":" kdePackages}"
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
let
|
||||
inherit (pkgs.lib) mkOption mkIf;
|
||||
cfg = config.services.xserver.desktopManager.kde;
|
||||
xorg = config.services.xserver.package;
|
||||
xcfg = config.services.xserver;
|
||||
cfg = xcfg.desktopManager.kde;
|
||||
xorg = xcfg.package;
|
||||
|
||||
options = { services = { xserver = { desktopManager = {
|
||||
|
||||
@ -18,7 +19,7 @@ let
|
||||
}; }; }; };
|
||||
in
|
||||
|
||||
mkIf cfg.enable {
|
||||
mkIf (xcfg.enable && cfg.enable) {
|
||||
require = [
|
||||
options
|
||||
|
||||
@ -63,7 +64,7 @@ mkIf cfg.enable {
|
||||
pkgs.kdebase
|
||||
];
|
||||
|
||||
extraPackages = [
|
||||
x11Packages = [
|
||||
xorg.xset # used by startkde, non-essential
|
||||
];
|
||||
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
let
|
||||
inherit (pkgs.lib) mkOption mkIf;
|
||||
cfg = config.services.xserver.desktopManager.kde4;
|
||||
xorg = config.services.xserver.package;
|
||||
xcfg = config.services.xserver;
|
||||
cfg = xcfg.desktopManager.kde4;
|
||||
xorg = xcfg.package;
|
||||
|
||||
options = { services = { xserver = { desktopManager = {
|
||||
|
||||
@ -18,7 +19,7 @@ let
|
||||
}; }; }; };
|
||||
in
|
||||
|
||||
mkIf cfg.enable {
|
||||
mkIf (xcfg.enable && cfg.enable) {
|
||||
require = [
|
||||
options
|
||||
|
||||
@ -57,7 +58,7 @@ mkIf cfg.enable {
|
||||
pkgs.shared_mime_info
|
||||
];
|
||||
|
||||
extraPackages = [
|
||||
x11Packages = [
|
||||
xorg.xmessage # so that startkde can show error messages
|
||||
pkgs.qt4 # needed for qdbus
|
||||
xorg.xset # used by startkde, non-essential
|
||||
|
@ -17,7 +17,7 @@ let
|
||||
|
||||
in
|
||||
|
||||
mkIf (config.services.xserver.enable && cfg.enable) {
|
||||
mkIf cfg.enable {
|
||||
require = options;
|
||||
|
||||
services = {
|
||||
@ -37,7 +37,7 @@ mkIf (config.services.xserver.enable && cfg.enable) {
|
||||
};
|
||||
|
||||
environment = {
|
||||
extraPackages = [
|
||||
x11Packages = [
|
||||
pkgs.xterm
|
||||
];
|
||||
};
|
||||
|
@ -59,6 +59,6 @@ mkIf cfg.enable {
|
||||
};
|
||||
|
||||
environment = {
|
||||
extraPackages = [ pkgs.compiz ];
|
||||
x11Packages = [ pkgs.compiz ];
|
||||
};
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ mkIf cfg.enable {
|
||||
};
|
||||
|
||||
environment = {
|
||||
extraPackages = [
|
||||
x11Packages = [
|
||||
pkgs.kdelibs
|
||||
pkgs.kdebase
|
||||
];
|
||||
|
@ -44,6 +44,6 @@ mkIf cfg.enable {
|
||||
};
|
||||
|
||||
environment = {
|
||||
extraPackages = [ gnome.metacity ];
|
||||
x11Packages = [ gnome.metacity ];
|
||||
};
|
||||
}
|
||||
|
@ -39,6 +39,6 @@ mkIf cfg.enable {
|
||||
};
|
||||
|
||||
environment = {
|
||||
extraPackages = [ xorg.twm ];
|
||||
x11Packages = [ xorg.twm ];
|
||||
};
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ mkIf cfg.enable {
|
||||
};
|
||||
|
||||
environment = {
|
||||
extraPackages = [
|
||||
x11Packages = [
|
||||
pkgs.wmiiSnap
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user