mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 22:20:51 +00:00
37 lines
619 B
Nix
37 lines
619 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.xserver.desktopManager.xterm;
|
|
|
|
in
|
|
|
|
{
|
|
options = {
|
|
|
|
services.xserver.desktopManager.xterm.enable = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
description = "Enable a xterm terminal as a desktop manager.";
|
|
};
|
|
|
|
};
|
|
|
|
config = mkIf (config.services.xserver.enable && cfg.enable) {
|
|
|
|
services.xserver.desktopManager.session = singleton
|
|
{ name = "xterm";
|
|
start = ''
|
|
${pkgs.xterm}/bin/xterm -ls &
|
|
waitPID=$!
|
|
'';
|
|
};
|
|
|
|
environment.systemPackages = [ pkgs.xterm ];
|
|
|
|
};
|
|
|
|
}
|