herbstluftwm: Add option to specify package

This commit is contained in:
Felix Dietze 2021-01-30 12:13:39 -01:00
parent 8ca74894e3
commit 5a827051aa

View File

@ -11,6 +11,15 @@ in
services.xserver.windowManager.herbstluftwm = {
enable = mkEnableOption "herbstluftwm";
package = mkOption {
type = types.package;
default = pkgs.herbstluftwm;
defaultText = "pkgs.herbstluftwm";
description = ''
Herbstluftwm package to use.
'';
};
configFile = mkOption {
default = null;
type = with types; nullOr path;
@ -31,8 +40,8 @@ in
(cfg.configFile != null)
''-c "${cfg.configFile}"''
;
in "${pkgs.herbstluftwm}/bin/herbstluftwm ${configFileClause}";
in "${cfg.package}/bin/herbstluftwm ${configFileClause}";
};
environment.systemPackages = [ pkgs.herbstluftwm ];
environment.systemPackages = [ cfg.package ];
};
}