1 { config, lib, pkgs, ... }:
6 cfg = config.services.xserver.windowManager.herbstluftwm;
11 services.xserver.windowManager.herbstluftwm = {
12 enable = mkEnableOption (lib.mdDoc "herbstluftwm");
16 default = pkgs.herbstluftwm;
17 defaultText = literalExpression "pkgs.herbstluftwm";
18 description = lib.mdDoc ''
19 Herbstluftwm package to use.
23 configFile = mkOption {
25 type = with types; nullOr path;
26 description = lib.mdDoc ''
27 Path to the herbstluftwm configuration file. If left at the
28 default value, $XDG_CONFIG_HOME/herbstluftwm/autostart will
35 config = mkIf cfg.enable {
36 services.xserver.windowManager.session = singleton {
37 name = "herbstluftwm";
39 let configFileClause = optionalString
40 (cfg.configFile != null)
41 ''-c "${cfg.configFile}"''
43 in "${cfg.package}/bin/herbstluftwm ${configFileClause}";
45 environment.systemPackages = [ cfg.package ];