config/users/pbsds/home/profiles/bat.nix

35 lines
1.0 KiB
Nix

{ pkgs, ... }:
{
home.packages = with pkgs; [
bat
#bat-extras.batman
];
# bat - TODO: condition these on programs.bat.enable ?
home.shellAliases.cat = "bat --style=plain --paging=never";
#home.shellAliases.man = "batman";
home.shellAliases.man = "PAGER=${pkgs.most}/bin/most man";
# TODO: implement programs.bat.enableAliases
programs.bat = {
enable = true;
themes.railscast = builtins.readFile (pkgs.fetchFromGitHub {
owner = "jeromedalbert";
repo = "sublime-text-railscasttextmate-theme";
rev = "0a4861f35e72f9ad4cc1cac42730ea563be2ffd3";
hash = "sha256-1Ml5vqP9r6oCfLhaNGPQJXS8e7utxQQycIm3Hk9wE3w=";
} + "/railscast-textmate.tmtheme");
config.theme = "railscast";
#config.style = "plain";
config.map-syntax = [
"poetry.toml:toml"
"flake.lock:json"
"*.jsonl:json"
];
# only in unstable as of 22.11:
#extraPackages = with pkgs.bat-extras; [ batdiff batman batgrep batwatch ];
};
# TODO: generate bat syntax cache: 'bat cache --build'
}