feat(home-manager): init fzf module (#93)

This commit is contained in:
Anomalocaridid 2024-04-10 01:50:45 -04:00 committed by GitHub
parent 19256c4539
commit b08e4805e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,35 @@
{ config
, lib
, sources
, ...
}:
let
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";
}
);
}

View file

@ -59,6 +59,7 @@ in
bottom = ctpEnable;
btop = ctpEnable;
fish = ctpEnable;
fzf = ctpEnable;
git.enable = true; # Required for delta
git.delta = ctpEnable;
gitui = ctpEnable;