From fd0f8adaab91a68190631ab9991ebe73c17d05bc Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 8 Jun 2019 01:01:22 -0400 Subject: [PATCH] nixos/desktop-managers/xterm: Defaults to xserver's state This enhances #61423, which removed the gating of desktop-managers from being linked to the xserver's state. This, though, brought in xterm into all systems, even those without X servers. This change sets the *default* of the xterm desktop-manager to the state of the xserver, keeping it enabled by default as a sane fallback. The xterm desktop-manager can still be enabled or disabled as needed, without it being affected by xserver's state. --- nixos/modules/services/x11/desktop-managers/xterm.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/desktop-managers/xterm.nix b/nixos/modules/services/x11/desktop-managers/xterm.nix index f386ebc4d3c1..ea441fbbe715 100644 --- a/nixos/modules/services/x11/desktop-managers/xterm.nix +++ b/nixos/modules/services/x11/desktop-managers/xterm.nix @@ -5,6 +5,7 @@ with lib; let cfg = config.services.xserver.desktopManager.xterm; + xserverEnabled = config.services.xserver.enable; in @@ -13,7 +14,8 @@ in services.xserver.desktopManager.xterm.enable = mkOption { type = types.bool; - default = true; + default = xserverEnabled; + defaultText = "config.services.xserver.enable"; description = "Enable a xterm terminal as a desktop manager."; };