2009-01-25 15:49:08 +00:00
|
|
|
{pkgs, config, ...}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs.lib) mkOption mkIf;
|
|
|
|
cfg = config.services.xserver.windowManager.twm;
|
2009-09-11 09:41:19 +00:00
|
|
|
xorg = pkgs.xorg;
|
2009-01-25 15:49:08 +00:00
|
|
|
|
|
|
|
option = { services = { xserver = { windowManager = {
|
|
|
|
|
|
|
|
twm = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "Enable the twm window manager.";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}; }; }; };
|
|
|
|
in
|
|
|
|
|
|
|
|
mkIf cfg.enable {
|
|
|
|
require = option;
|
|
|
|
|
|
|
|
services = {
|
|
|
|
xserver = {
|
|
|
|
|
|
|
|
windowManager = {
|
|
|
|
session = [{
|
|
|
|
name = "twm";
|
|
|
|
start = "
|
|
|
|
${xorg.twm}/bin/twm &
|
|
|
|
waitPID=$!
|
|
|
|
";
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
environment = {
|
2009-06-25 22:08:03 +00:00
|
|
|
x11Packages = [ xorg.twm ];
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
|
|
|
}
|