From 50c9bccb6abc52811a59db620606e016fcde32bd Mon Sep 17 00:00:00 2001 From: Nicholas Sielicki Date: Sat, 5 Nov 2022 18:57:15 -0500 Subject: [PATCH] bat: add extraPackages option The bat program has a few additional packages in Nixpkgs, allow for these to be specified via Home Manager. --- modules/programs/bat.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/programs/bat.nix b/modules/programs/bat.nix index 30b0bbb71..df2e49685 100644 --- a/modules/programs/bat.nix +++ b/modules/programs/bat.nix @@ -30,6 +30,16 @@ in { ''; }; + extraPackages = mkOption { + type = types.listOf types.package; + default = [ ]; + example = literalExpression + "with pkgs.bat-extras; [ batdiff batman batgrep batwatch ];"; + description = '' + Additional bat packages to install. + ''; + }; + themes = mkOption { type = types.attrsOf types.lines; default = { }; @@ -51,7 +61,7 @@ in { }; config = mkIf cfg.enable { - home.packages = [ pkgs.bat ]; + home.packages = [ pkgs.bat ] ++ cfg.extraPackages; xdg.configFile = mkMerge ([{ "bat/config" =