summaryrefslogtreecommitdiff
path: root/modules/basic-tools/fzf.nix
blob: 6fc84fe675189603825a513f0c50a6fe960478a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ lib, config, pkgs, ... }: {

  environment = {
    systemPackages = [ pkgs.fzf ];
    shellAliases = {
      vf = "$EDITOR $(fzf)";
      vff = "$EDITOR $(ls|fzf)";
    };
  };
  # integrate fzf into shell, >23.05 only
  programs = with lib;
    if (toInt (elemAt (splitVersion config.system.nixos.release) 0) >= 23) then {
      fzf = {
        keybindings = true;
        fuzzyCompletion = true;
      };
    } else { };
}