nixpkgs-suyu/modules/services/x11/window-managers/xmonad.nix
Nicolas Pierron 36573e5e5c Convert module which are declaring options into modules separated with an
"options" set to declare options and a "config" set to define options.

svn path=/nixos/trunk/; revision=17148
2009-09-15 08:33:45 +00:00

30 lines
578 B
Nix

{pkgs, config, ...}:
let
inherit (pkgs.lib) mkOption mkIf;
cfg = config.services.xserver.windowManager.xmonad;
in
{
options = {
services.xserver.windowManager.xmonad = {
enable = mkOption {
default = false;
example = true;
description = "Enable the xmonad window manager.";
};
};
};
config = {
services.xserver.windowManager = {
session = mkIf cfg.enable [{
name = "xmonad";
start = "
${pkgs.haskellPackages.xmonad}/bin/xmonad &
waitPID=$!
";
}];
};
};
}