depot/third_party/nixpkgs/nixos/modules/services/x11/desktop-managers/xterm.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

38 lines
833 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.desktopManager.xterm;
xSessionEnabled = config.services.xserver.enable;
in
{
options = {
services.xserver.desktopManager.xterm.enable = mkOption {
type = types.bool;
default = versionOlder config.system.stateVersion "19.09" && xSessionEnabled;
defaultText = literalExpression ''versionOlder config.system.stateVersion "19.09" && config.services.xserver.enable;'';
description = lib.mdDoc "Enable a xterm terminal as a desktop manager.";
};
};
config = mkIf cfg.enable {
services.xserver.desktopManager.session = singleton
{ name = "xterm";
start = ''
${pkgs.xterm}/bin/xterm -ls &
waitPID=$!
'';
};
environment.systemPackages = [ pkgs.xterm ];
};
}