1 { config, lib, pkgs, ... }:
6 cfg = config.services.xserver.windowManager.herbstluftwm;
11 services.xserver.windowManager.herbstluftwm = {
12 enable = mkEnableOption "herbstluftwm";
14 package = mkPackageOption pkgs "herbstluftwm" { };
16 configFile = mkOption {
18 type = with types; nullOr path;
20 Path to the herbstluftwm configuration file. If left at the
21 default value, $XDG_CONFIG_HOME/herbstluftwm/autostart will
28 config = mkIf cfg.enable {
29 services.xserver.windowManager.session = singleton {
30 name = "herbstluftwm";
32 let configFileClause = optionalString
33 (cfg.configFile != null)
34 ''-c "${cfg.configFile}"''
37 ${cfg.package}/bin/herbstluftwm ${configFileClause} &
41 environment.systemPackages = [ cfg.package ];