From 7e70eedc49d058f6d97bb6c37a39776b4d2ef6e8 Mon Sep 17 00:00:00 2001 From: Jules Amonith Date: Wed, 19 Apr 2023 03:55:33 -0400 Subject: [PATCH] Add fzf module (#84) --- modules/fzf/hm.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 modules/fzf/hm.nix diff --git a/modules/fzf/hm.nix b/modules/fzf/hm.nix new file mode 100644 index 0000000..089efcc --- /dev/null +++ b/modules/fzf/hm.nix @@ -0,0 +1,29 @@ +{ pkgs, config, lib, ... }: +let + mkFzfKeyValue = lib.generators.mkKeyValueDefault { } ":"; + + colorConfig = with config.lib.stylix.colors.withHashtag; + lib.concatStringsSep "," (lib.mapAttrsToList mkFzfKeyValue { + "bg" = base00; + "bg+" = base01; + "fg" = base04; + "fg+" = base06; + "header" = base0D; + "hl" = base0D; + "hl+" = base0D; + "info" = base0A; + "marker" = base0C; + "pointer" = base0C; + "prompt" = base0A; + "spinner" = base0C; + }); +in +{ + options.stylix.targets.fzf = { + enable = config.lib.stylix.mkEnableTarget "Fzf" config.programs.fzf.enable; + }; + + config = lib.mkIf config.stylix.targets.fzf.enable { + programs.fzf.defaultOptions = lib.mkAfter [ "--color=${colorConfig}" ]; + }; +}