2014-04-14 14:26:48 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2013-09-04 11:05:09 +00:00
|
|
|
|
2014-04-14 14:26:48 +00:00
|
|
|
with lib;
|
2009-01-25 15:49:08 +00:00
|
|
|
|
|
|
|
let
|
2009-06-22 20:34:51 +00:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
cfg = config.services.xserver.desktopManager.xterm;
|
2019-09-19 11:27:05 +00:00
|
|
|
xSessionEnabled = config.services.xserver.enable;
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2013-09-04 11:05:09 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2009-06-22 20:34:51 +00:00
|
|
|
options = {
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2009-06-22 20:34:51 +00:00
|
|
|
services.xserver.desktopManager.xterm.enable = mkOption {
|
2018-05-13 01:15:23 +00:00
|
|
|
type = types.bool;
|
2021-10-03 16:06:03 +00:00
|
|
|
default = versionOlder config.system.stateVersion "19.09" && xSessionEnabled;
|
|
|
|
defaultText = literalExpression ''versionOlder config.system.stateVersion "19.09" && config.services.xserver.enable;'';
|
2022-07-28 21:19:15 +00:00
|
|
|
description = lib.mdDoc "Enable a xterm terminal as a desktop manager.";
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
|
|
|
|
2009-06-22 20:34:51 +00:00
|
|
|
};
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2019-05-13 16:57:09 +00:00
|
|
|
config = mkIf cfg.enable {
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2013-09-04 11:05:09 +00:00
|
|
|
services.xserver.desktopManager.session = singleton
|
|
|
|
{ name = "xterm";
|
|
|
|
start = ''
|
|
|
|
${pkgs.xterm}/bin/xterm -ls &
|
|
|
|
waitPID=$!
|
|
|
|
'';
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
|
|
|
|
2013-09-04 11:05:09 +00:00
|
|
|
environment.systemPackages = [ pkgs.xterm ];
|
2009-01-25 15:49:08 +00:00
|
|
|
|
|
|
|
};
|
2013-09-04 11:05:09 +00:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
}
|