2010-01-05 15:30:56 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
2009-01-25 15:49:08 +00:00
|
|
|
|
|
|
|
let
|
2010-01-05 15:30:56 +00:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
cfg = config.services.xserver.windowManager.twm;
|
|
|
|
|
2010-01-05 15:30:56 +00:00
|
|
|
in
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2010-01-05 15:30:56 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2010-01-05 15:30:56 +00:00
|
|
|
options = {
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2010-01-05 15:30:56 +00:00
|
|
|
services.xserver.windowManager.twm.enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "Enable the twm window manager.";
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
|
|
|
|
2010-01-05 15:30:56 +00:00
|
|
|
};
|
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2010-01-05 15:30:56 +00:00
|
|
|
###### implementation
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2010-01-05 15:30:56 +00:00
|
|
|
config = mkIf cfg.enable {
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2010-01-05 15:30:56 +00:00
|
|
|
services.xserver.windowManager.session = singleton
|
|
|
|
{ name = "twm";
|
|
|
|
start =
|
|
|
|
''
|
|
|
|
${pkgs.xorg.twm}/bin/twm &
|
2009-01-25 15:49:08 +00:00
|
|
|
waitPID=$!
|
2010-01-05 15:30:56 +00:00
|
|
|
'';
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
|
|
|
|
2010-01-05 15:30:56 +00:00
|
|
|
environment.x11Packages = [ pkgs.xorg.twm ];
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|