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