27 lines
511 B
Nix
27 lines
511 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (config.rose-pine) sources;
|
|
|
|
cfg = config.programs.bat.rose-pine;
|
|
enable = cfg.enable && config.programs.bat.enable;
|
|
|
|
themeName = lib.rp.getKebabTheme cfg.flavor;
|
|
in
|
|
{
|
|
options.programs.bat.rose-pine = lib.rp.mkRosePineOpt { name = "bat"; };
|
|
|
|
config = lib.mkIf enable {
|
|
programs.bat = {
|
|
config.theme = themeName;
|
|
|
|
themes.${themeName} = {
|
|
src = sources.tm-theme;
|
|
file = "dist/themes/${themeName}.tmTheme";
|
|
};
|
|
};
|
|
};
|
|
}
|