6e802e5d75
-> No longer install graphical packages if the xserver is disabled. -> avoid duplication of "mkIf config.services.xserver.enable". svn path=/nixos/branches/modular-nixos/; revision=16044
47 lines
710 B
Nix
47 lines
710 B
Nix
{pkgs, config, ...}:
|
|
|
|
let
|
|
inherit (pkgs.lib) mkOption mkIf;
|
|
cfg = config.services.xserver.windowManager.kwm;
|
|
|
|
option = { services = { xserver = { windowManager = {
|
|
|
|
kwm = {
|
|
enable = mkOption {
|
|
default = false;
|
|
example = true;
|
|
description = "Enable the kwm window manager.";
|
|
};
|
|
|
|
};
|
|
|
|
}; }; }; };
|
|
in
|
|
|
|
mkIf cfg.enable {
|
|
require = option;
|
|
|
|
services = {
|
|
xserver = {
|
|
|
|
windowManager = {
|
|
session = [{
|
|
name = "kwm";
|
|
start = "
|
|
${pkgs.kdebase}/bin/kwin &
|
|
waitPID=$!
|
|
";
|
|
}];
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
environment = {
|
|
x11Packages = [
|
|
pkgs.kdelibs
|
|
pkgs.kdebase
|
|
];
|
|
};
|
|
}
|