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

36 lines
1.1 KiB
Nix
Raw Normal View History

2023-03-03 23:33:37 +01:00
{ pkgs, ... }:
{
home.packages = with pkgs; [
bat
2023-03-19 04:23:38 +01:00
#bat-extras.batman
2023-03-03 23:33:37 +01:00
];
# bat - TODO: condition these on programs.bat.enable ?
home.shellAliases.cat = "bat --style=plain --paging=never";
2023-03-19 04:23:38 +01:00
#home.shellAliases.man = "batman";
home.shellAliases.man = "PAGER=${pkgs.most}/bin/most man";
2023-03-03 23:33:37 +01:00
# TODO: implement programs.bat.enableAliases
programs.bat = {
enable = true;
2024-02-18 22:14:40 +01:00
#config.style = "plain";
config.theme = "railscast";
themes.railscast.file = "railscast-textmate.tmtheme";
themes.railscast.src = pkgs.fetchFromGitHub {
2023-03-03 23:33:37 +01:00
owner = "jeromedalbert";
repo = "sublime-text-railscasttextmate-theme";
2024-02-18 22:14:40 +01:00
rev = "0a4861f35e72f9ad4cc1cac42730ea563be2ffd3"; # 11 years old
2023-03-03 23:33:37 +01:00
hash = "sha256-1Ml5vqP9r6oCfLhaNGPQJXS8e7utxQQycIm3Hk9wE3w=";
2024-02-18 22:14:40 +01:00
};
2023-03-03 23:33:37 +01:00
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 ];
};
2023-03-04 00:09:57 +01:00
# TODO: generate bat syntax cache: 'bat cache --build'
2023-03-03 23:33:37 +01:00
}