* Added a module for IceWM.

svn path=/nixos/trunk/; revision=19238
This commit is contained in:
Eelco Dolstra 2010-01-05 15:30:56 +00:00
parent bc8445a89e
commit 62476f2816
2 changed files with 70 additions and 30 deletions

View file

@ -0,0 +1,42 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.xserver.windowManager.icewm;
in
{
###### interface
options = {
services.xserver.windowManager.icewm.enable = mkOption {
default = false;
description = "Enable the IceWM window manager.";
};
};
###### implementation
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton
{ name = "icewm";
start =
''
${pkgs.icewm}/bin/icewm &
waitPID=$!
'';
};
environment.x11Packages = [ pkgs.icewm ];
};
}

View file

@ -1,44 +1,42 @@
{pkgs, config, ...}:
{ config, pkgs, ... }:
with pkgs.lib;
let
inherit (pkgs.lib) mkOption mkIf;
cfg = config.services.xserver.windowManager.twm;
xorg = pkgs.xorg;
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 = {
###### interface
windowManager = {
session = [{
name = "twm";
start = "
${xorg.twm}/bin/twm &
options = {
services.xserver.windowManager.twm.enable = mkOption {
default = false;
description = "Enable the twm window manager.";
};
};
###### implementation
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton
{ name = "twm";
start =
''
${pkgs.xorg.twm}/bin/twm &
waitPID=$!
";
}];
'';
};
};
environment.x11Packages = [ pkgs.xorg.twm ];
};
environment = {
x11Packages = [ xorg.twm ];
};
}