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`
36 lines
907 B
Nix
36 lines
907 B
Nix
{ config
|
|
, lib
|
|
, ...
|
|
}:
|
|
let
|
|
inherit (config.catppuccin) sources;
|
|
|
|
cfg = config.programs.fzf.catppuccin;
|
|
enable = cfg.enable && config.programs.fzf.enable;
|
|
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors;
|
|
in
|
|
{
|
|
options.programs.fzf.catppuccin =
|
|
lib.ctp.mkCatppuccinOpt "fzf";
|
|
|
|
config.programs.fzf.colors = lib.mkIf enable
|
|
# Manually populate with colors from catppuccin/fzf
|
|
# The ordering is meant to match the order of catppuccin/fzf to make comparison easier
|
|
(lib.attrsets.mapAttrs (_: color: palette.${color}.hex)
|
|
{
|
|
"bg+" = "surface0";
|
|
bg = "base";
|
|
spinner = "rosewater";
|
|
hl = "red";
|
|
fg = "text";
|
|
header = "red";
|
|
info = "mauve";
|
|
pointer = "rosewater";
|
|
marker = "rosewater";
|
|
"fg+" = "text";
|
|
prompt = "mauve";
|
|
"hl+" = "red";
|
|
}
|
|
);
|
|
}
|
|
|