2025-01-06 16:05:58 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
let
|
|
|
|
# Fuzzy shell history and file search.
|
|
|
|
#
|
|
|
|
# Use fzf to search your command history (with STRG + r) and do file searches (with STRG + t).
|
|
|
|
#
|
|
|
|
# Resources:
|
|
|
|
# https://martinheinz.dev/blog/110
|
|
|
|
# https://fryboyter.de/fuzzy-finder-fuer-die-zsh/
|
|
|
|
# https://fryboyter.de/suche-mit-fzf-beschleunigen/
|
|
|
|
#
|
|
|
|
fzf-config = {
|
|
|
|
enable = true;
|
|
|
|
# Replace the default command `find` with faster `fd`.
|
|
|
|
# Why `fd` is better than `ripgrep` in this case: https://www.reddit.com/r/linux4noobs/comments/egb644/fzf_newcomer_fd_or_ripgrep/
|
|
|
|
defaultCommand = "fd --type f";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2025-02-09 21:35:44 +01:00
|
|
|
home-manager.users."yoda" = { osConfig, config, pkgs, ... }: {
|
2025-01-06 16:05:58 +01:00
|
|
|
programs.fzf = fzf-config;
|
|
|
|
};
|
2025-02-09 21:35:44 +01:00
|
|
|
home-manager.users."root" = { osConfig, config, pkgs, ... }: {
|
2025-01-06 16:05:58 +01:00
|
|
|
programs.fzf = fzf-config;
|
|
|
|
};
|
|
|
|
|
2025-02-09 21:35:44 +01:00
|
|
|
users.users."yoda" = {
|
2025-01-06 16:05:58 +01:00
|
|
|
packages = with pkgs; [
|
|
|
|
fd
|
|
|
|
];
|
|
|
|
};
|
2025-02-09 21:35:44 +01:00
|
|
|
users.users."root" = {
|
2025-01-06 16:05:58 +01:00
|
|
|
packages = with pkgs; [
|
|
|
|
fd
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|