* 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:
parent
74995fe553
commit
2346754f5e
@ -4,6 +4,8 @@ let
|
|||||||
inherit (pkgs.lib) mkOption mergeOneOption mkIf filter optionalString any;
|
inherit (pkgs.lib) mkOption mergeOneOption mkIf filter optionalString any;
|
||||||
cfg = config.services.xserver.desktopManager;
|
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);
|
needBGCond = d: ! (d ? bgSupport && d.bgSupport);
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -50,7 +52,6 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
default = mkOption {
|
default = mkOption {
|
||||||
default = "xterm";
|
default = "xterm";
|
||||||
example = "none";
|
example = "none";
|
||||||
@ -68,7 +69,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = mkIf cfg.session.needBGPackages {
|
environment = mkIf (config.services.xserver.enable && cfg.session.needBGPackages) {
|
||||||
extraPackages = [ pkgs.feh ];
|
extraPackages = [ pkgs.feh ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
{pkgs, config, ...}:
|
{pkgs, config, ...}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
inherit (pkgs.lib) mkOption mkIf;
|
inherit (pkgs.lib) mkOption mkIf;
|
||||||
cfg = config.services.xserver.desktopManager.xterm;
|
cfg = config.services.xserver.desktopManager.xterm;
|
||||||
|
|
||||||
options = { services = { xserver = { desktopManager = {
|
options = {
|
||||||
|
|
||||||
xterm = {
|
services.xserver.desktopManager.xterm.enable = mkOption {
|
||||||
enable = mkOption {
|
default = true;
|
||||||
default = true;
|
example = false;
|
||||||
example = false;
|
description = "Enable a xterm terminal as a desktop manager.";
|
||||||
description = "Enable a xterm terminal as a desktop manager.";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}; }; }; };
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf cfg.enable {
|
mkIf (config.services.xserver.enable && cfg.enable) {
|
||||||
require = options;
|
require = options;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user