- All base/* modules now use (mkEnableOption "...") // { default = true; }
so they activate automatically when imported — no explicit .enable = true
required in host configs
- packages.nix: add comment documenting that lazylib does not exist in
nixpkgs; lazygit is the correct and intended package
- zellij-ps.nix: clarify that cli.zellij-ps namespace is intentional —
it is the home-manager module convention from m3ta-nixpkgs
- nix flake check passes (warnings are pre-existing)
42 lines
1.5 KiB
Nix
42 lines
1.5 KiB
Nix
# Fuzzy finder with nix-colors palette and Wayland clipboard integration.
|
|
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.base.cliTools.fzf;
|
|
in {
|
|
# Enabled by default — base modules are always-on.
|
|
options.base.cliTools.fzf.enable = (mkEnableOption "enable fuzzy finder") // {default = true;};
|
|
|
|
config = mkIf cfg.enable {
|
|
programs.fzf = {
|
|
enable = true;
|
|
enableFishIntegration = true;
|
|
colors = {
|
|
"fg" = "#${config.colorScheme.palette.base05}";
|
|
"bg" = "#${config.colorScheme.palette.base00}";
|
|
"hl" = "#${config.colorScheme.palette.base0E}";
|
|
"fg+" = "#${config.colorScheme.palette.base05}";
|
|
"bg+" = "#${config.colorScheme.palette.base02}";
|
|
"hl+" = "#${config.colorScheme.palette.base0E}";
|
|
"info" = "#${config.colorScheme.palette.base09}";
|
|
"prompt" = "#${config.colorScheme.palette.base0B}";
|
|
"pointer" = "#${config.colorScheme.palette.base08}";
|
|
"marker" = "#${config.colorScheme.palette.base08}";
|
|
"spinner" = "#${config.colorScheme.palette.base09}";
|
|
"header" = "#${config.colorScheme.palette.base03}";
|
|
};
|
|
defaultOptions = [
|
|
"--preview='bat --color=always -n {}'"
|
|
"--bind 'ctrl-/:toggle-preview'"
|
|
"--header 'Press CTRL-Y to copy command into clipboard'"
|
|
"--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'"
|
|
];
|
|
defaultCommand = "fd --type f --exclude .git --follow --hidden";
|
|
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden";
|
|
};
|
|
};
|
|
}
|