rose-pine-nix/modules/home-manager/fzf.nix
punkfairie 190737eca1
fix(palette): Move JSON palette to it's own repo
Nix was complaining that paths weren't absolute so I just made the JSON
file its own repo so I can import it with npins.
2024-10-20 17:53:31 -07:00

37 lines
979 B
Nix

{
config,
lib,
...
}: let
inherit (config.rose-pine) sources;
cfg = config.programs.fzf.rose-pine;
enable = cfg.enable && config.programs.fzf.enable;
palette = (lib.importJSON "${sources.rose-pine-palette}/palette.json").${cfg.flavor}.colors;
in {
options.programs.fzf.rose-pine =
lib.rp.mkRosePineOpt {name = "fzf";};
config.programs.fzf.colors =
lib.mkIf enable
# Manually populate with colors from rose-pine/fzf
# The ordering is meant to match the order of rose-pine/fzf to make
# comparison easier
(
lib.attrsets.mapAttrs (_: color: palette.${color}.hex) {
fg = "subtle";
bg = "base";
hl = "rose";
"fg+" = "text";
"bg+" = "overlay";
"hl+" = "rose";
border = "highlight-med";
header = "pine";
gutter = "base";
spinner = "gold";
info = "foam";
pointer = "iris";
marker = "love";
prompt = "subtle";
}
);
}