rose-pine-nix/modules/home-manager/bat.nix

31 lines
710 B
Nix
Raw Normal View History

{ config
, pkgs
, lib
, ...
}:
let
cfg = config.programs.bat.catppuccin;
enable = cfg.enable && config.programs.bat.enable;
in
2023-03-27 17:32:26 -07:00
{
2023-04-17 09:44:07 -07:00
options.programs.bat.catppuccin =
lib.ctp.mkCatppuccinOpt "bat" config;
2023-03-27 15:49:50 -07:00
2023-03-27 17:32:26 -07:00
config = {
programs.bat = lib.mkIf enable {
2023-03-27 15:49:50 -07:00
config.theme = "Catppuccin-${cfg.flavour}";
themes."Catppuccin-${cfg.flavour}" = {
src =
pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
hash = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
};
file = "Catppuccin-${cfg.flavour}.tmTheme";
};
2023-03-27 15:49:50 -07:00
};
};
}