8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
38 lines
954 B
Nix
38 lines
954 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.xserver.windowManager.herbstluftwm;
|
|
in
|
|
|
|
{
|
|
options = {
|
|
services.xserver.windowManager.herbstluftwm = {
|
|
enable = mkEnableOption "herbstluftwm";
|
|
|
|
configFile = mkOption {
|
|
default = null;
|
|
type = with types; nullOr path;
|
|
description = ''
|
|
Path to the herbstluftwm configuration file. If left at the
|
|
default value, $XDG_CONFIG_HOME/herbstluftwm/autostart will
|
|
be used.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.xserver.windowManager.session = singleton {
|
|
name = "herbstluftwm";
|
|
start =
|
|
let configFileClause = optionalString
|
|
(cfg.configFile != null)
|
|
''-c "${cfg.configFile}"''
|
|
;
|
|
in "${pkgs.herbstluftwm}/bin/herbstluftwm ${configFileClause}";
|
|
};
|
|
environment.systemPackages = [ pkgs.herbstluftwm ];
|
|
};
|
|
}
|