depot/third_party/nixpkgs/nixos/modules/services/x11/desktop-managers/xterm.nix
Default email 5e2a688410 Project import generated by Copybara.
GitOrigin-RevId: 5e2018f7b383aeca6824a30c0cd1978c9532a46a
2021-10-06 10:57:05 -03:00

38 lines
823 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 = "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 ];
};
}