2009-01-25 15:49:08 +00:00
|
|
|
{pkgs, config, ...}:
|
|
|
|
|
|
|
|
let
|
2009-06-22 20:34:51 +00:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
inherit (pkgs.lib) mkOption mkIf;
|
|
|
|
cfg = config.services.xserver.desktopManager.xterm;
|
|
|
|
|
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 {
|
|
|
|
default = true;
|
|
|
|
example = false;
|
|
|
|
description = "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
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
in
|
|
|
|
|
2009-06-25 22:08:03 +00:00
|
|
|
mkIf cfg.enable {
|
2009-01-25 15:49:08 +00:00
|
|
|
require = options;
|
|
|
|
|
|
|
|
services = {
|
|
|
|
xserver = {
|
|
|
|
|
|
|
|
desktopManager = {
|
|
|
|
session = [{
|
|
|
|
name = "xterm";
|
|
|
|
start = ''
|
|
|
|
${pkgs.xterm}/bin/xterm -ls &
|
|
|
|
waitPID=$!
|
|
|
|
'';
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
environment = {
|
2009-06-25 22:08:03 +00:00
|
|
|
x11Packages = [
|
2009-01-25 15:49:08 +00:00
|
|
|
pkgs.xterm
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|