From 5a827051aadc3e50c4da9814ba5286a81d278681 Mon Sep 17 00:00:00 2001 From: Felix Dietze Date: Sat, 30 Jan 2021 12:13:39 -0100 Subject: [PATCH] herbstluftwm: Add option to specify package --- .../services/x11/window-managers/herbstluftwm.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/x11/window-managers/herbstluftwm.nix b/nixos/modules/services/x11/window-managers/herbstluftwm.nix index e3ea61cb9a6b..548097a412d2 100644 --- a/nixos/modules/services/x11/window-managers/herbstluftwm.nix +++ b/nixos/modules/services/x11/window-managers/herbstluftwm.nix @@ -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 ]; }; }