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 19:20:50 +01: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
|
|
|
};
|
|
|
|
|
2013-10-30 16:52:35 +00:00
|
|
|
environment.systemPackages = [ pkgs.xorg.twm ];
|
2011-09-14 19:20:50 +01:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|