28e6d8a18d
* feat(modules): add `catppuccin.sources` option * refactor(modules)!: nvfetcher -> npins npins gives us a nicer file to import that is a simple name value pair of the port and the path in the store. this allows for easier overriding with the catppuccin.sources option * fix(modules): ensure default sources are applied to `catppuccin.sources`
25 lines
505 B
Nix
25 lines
505 B
Nix
{ config
|
|
, lib
|
|
, ...
|
|
}:
|
|
let
|
|
inherit (config.catppuccin) sources;
|
|
cfg = config.programs.bat.catppuccin;
|
|
enable = cfg.enable && config.programs.bat.enable;
|
|
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavour}";
|
|
in
|
|
{
|
|
options.programs.bat.catppuccin =
|
|
lib.ctp.mkCatppuccinOpt "bat";
|
|
|
|
config = lib.mkIf enable {
|
|
programs.bat = {
|
|
config.theme = themeName;
|
|
|
|
themes.${themeName} = {
|
|
src = sources.bat;
|
|
file = "themes/${themeName}.tmTheme";
|
|
};
|
|
};
|
|
};
|
|
}
|