summaryrefslogtreecommitdiff
path: root/modules/basic-tools/fzf.nix
blob: 8ad1b92d98836cfed1d77cc6d52735f18920e5aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
  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
      { };
}