aboutsummaryrefslogtreecommitdiffstats
path: root/modules/terminal/fzf/default.nix
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-15 20:32:36 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-15 20:32:36 +0530
commit23616c2e13f63f0262d64538032b98ce83cc0ec2 (patch)
tree3ea56e8c12c6735b5dddb34b5699c59c00066b0f /modules/terminal/fzf/default.nix
parent01aaa7ad39c1fe8af6ffbca31abbab27dbfefc95 (diff)
downloadhome-manager-config-23616c2e13f63f0262d64538032b98ce83cc0ec2.tar.gz
home-manager-config-23616c2e13f63f0262d64538032b98ce83cc0ec2.zip
feat: renamed the options to reflect their changed directory stucture
Renamed the options for the configurations based on the sub-module that they belong to
Diffstat (limited to 'modules/terminal/fzf/default.nix')
-rw-r--r--modules/terminal/fzf/default.nix54
1 files changed, 33 insertions, 21 deletions
diff --git a/modules/terminal/fzf/default.nix b/modules/terminal/fzf/default.nix
index 7671b3c..499bf3c 100644
--- a/modules/terminal/fzf/default.nix
+++ b/modules/terminal/fzf/default.nix
@@ -1,17 +1,29 @@
-{ config, lib, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
# FZF - Fuzzy finder, CLI fuzzy search tool
{
imports = [ ./assertions.nix ];
+ options.terminal.fzf = {
+ enable = lib.mkEnableOption "Enables fzf.";
+ package = lib.mkPackageOption pkgs "fzf" { };
+ };
+
config =
let
shellIntegration = ''
- ${if config.programs.zsh.enable then "eval \"$(fzf --zsh)\"" else "eval \"$(fzf --bash)\""}
+ ${if config.terminal.zsh.enable then "eval \"$(fzf --zsh)\"" else "eval \"$(fzf --bash)\""}
'';
in
- lib.mkIf config.programs.fzf.enable {
+ lib.mkIf config.terminal.fzf.enable {
programs.fzf = {
+ enable = true;
+ package = config.terminal.fzf.package;
defaultOptions = [
"--height 100%"
"--layout=reverse"
@@ -26,26 +38,26 @@
];
colors = with config.scheme.withHashtag; {
- fg = base05; # Foreground
- bg = "-1"; # Background (-1 for transparent)
- hl = base0D; # Highlight
-
- "fg+" = base07; # Foreground for selected item
- "bg+" = "-1"; # Background for selected item
- "hl+" = base0D; # Highlight for selected item
-
- gutter = "-1"; # Remove the white margin at the left
-
- info = base0B; # Info text (usually count of items)
- border = base03; # Border color
- prompt = base0A; # Prompt text color
- pointer = base0F; # Pointer color (e.g., > for selected)
- marker = base0C; # Marker color (e.g., for multi-select)
- spinner = base0C; # Spinner color (during search)
+ fg = base05;
+ bg = "-1";
+ hl = base0D;
+
+ "fg+" = base07;
+ "bg+" = "-1";
+ "hl+" = base0D;
+
+ gutter = "-1";
+
+ info = base0B;
+ border = base03;
+ prompt = base0A;
+ pointer = base0F;
+ marker = base0C;
+ spinner = base0C;
};
};
- programs.zsh.initContent = lib.mkIf config.programs.zsh.enable (lib.mkAfter shellIntegration);
- programs.bash.initExtra = lib.mkIf config.programs.bash.enable (lib.mkAfter shellIntegration);
+ programs.zsh.initContent = lib.mkIf config.terminal.zsh.enable (lib.mkAfter shellIntegration);
+ programs.bash.initExtra = lib.mkIf config.terminal.bash.enable (lib.mkAfter shellIntegration);
};
}