nixpkgs/nixos/modules/services/x11/window-managers/herbstluftwm.nix
Eelco Dolstra 29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00

28 lines
594 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.windowManager.herbstluftwm;
in
{
options = {
services.xserver.windowManager.herbstluftwm.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = "Enable the herbstluftwm window manager.";
};
};
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "herbstluftwm";
start = "
${pkgs.herbstluftwm}/bin/herbstluftwm
";
};
environment.systemPackages = [ pkgs.herbstluftwm ];
};
}