feat(home-manager): init fzf module (#93)
This commit is contained in:
parent
19256c4539
commit
b08e4805e3
2 changed files with 36 additions and 0 deletions
35
modules/home-manager/fzf.nix
Normal file
35
modules/home-manager/fzf.nix
Normal 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";
|
||||
}
|
||||
);
|
||||
}
|
||||
|
1
test.nix
1
test.nix
|
@ -59,6 +59,7 @@ in
|
|||
bottom = ctpEnable;
|
||||
btop = ctpEnable;
|
||||
fish = ctpEnable;
|
||||
fzf = ctpEnable;
|
||||
git.enable = true; # Required for delta
|
||||
git.delta = ctpEnable;
|
||||
gitui = ctpEnable;
|
||||
|
|
Loading…
Reference in a new issue