From cc7eec6a81d1d888551f06b80718c2162c2ad4c0 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Thu, 19 Dec 2024 17:49:08 +0100 Subject: [PATCH] home-manager/terminal/programs/bat: update MANPAGER to work with --help --- config/home-manager/terminal/programs/bat.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/config/home-manager/terminal/programs/bat.nix b/config/home-manager/terminal/programs/bat.nix index 95aa1c1..4a7e8eb 100644 --- a/config/home-manager/terminal/programs/bat.nix +++ b/config/home-manager/terminal/programs/bat.nix @@ -1,10 +1,19 @@ -_: { +{pkgs, ...}: { programs.bat = { enable = true; config.theme = "base16"; }; - home.sessionVariables = { - MANPAGER = "sh -c 'col -bx | bat -l man -p'"; - MANROFFOPT = "-c"; + + home = { + sessionVariables = { + MANPAGER = "sh -c 'col -bx | bat --language man' "; + MANROFFOPT = "-c"; + }; + + packages = with pkgs.bat-extras; [ + batman + ]; + + shellAliases.man = "batman"; }; }