3
0
Fork 0
forked from mirrors/nixpkgs

* Don't add xterm and feh to the system path if the X server is

disabled.  Other desktop/display/window manager modules should be
  conditional on config.services.xserver.enable as well, but at least
  they're disabled by default due to other options.

svn path=/nixos/branches/modular-nixos/; revision=16031
This commit is contained in:
Eelco Dolstra 2009-06-22 20:34:51 +00:00
parent 74995fe553
commit 2346754f5e
2 changed files with 12 additions and 11 deletions

View file

@ -4,6 +4,8 @@ let
inherit (pkgs.lib) mkOption mergeOneOption mkIf filter optionalString any;
cfg = config.services.xserver.desktopManager;
# Whether desktop manager `d' is capable of setting a background.
# If it isn't, the `feh' program is used as a fallback.
needBGCond = d: ! (d ? bgSupport && d.bgSupport);
in
@ -50,7 +52,6 @@ in
};
default = mkOption {
default = "xterm";
example = "none";
@ -68,7 +69,7 @@ in
};
};
environment = mkIf cfg.session.needBGPackages {
environment = mkIf (config.services.xserver.enable && cfg.session.needBGPackages) {
extraPackages = [ pkgs.feh ];
};
}

View file

@ -1,23 +1,23 @@
{pkgs, config, ...}:
let
inherit (pkgs.lib) mkOption mkIf;
cfg = config.services.xserver.desktopManager.xterm;
options = { services = { xserver = { desktopManager = {
options = {
xterm = {
enable = mkOption {
default = true;
example = false;
description = "Enable a xterm terminal as a desktop manager.";
};
services.xserver.desktopManager.xterm.enable = mkOption {
default = true;
example = false;
description = "Enable a xterm terminal as a desktop manager.";
};
}; }; }; };
};
in
mkIf cfg.enable {
mkIf (config.services.xserver.enable && cfg.enable) {
require = options;
services = {