From 662657dadbb77fd68848a78dd6119d360f3410b1 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 15 Apr 2024 23:10:06 +0200 Subject: [PATCH] Add nix-index --- home/programs/terminal/tools/default.nix | 1 + home/programs/terminal/tools/nix-index.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 home/programs/terminal/tools/nix-index.nix diff --git a/home/programs/terminal/tools/default.nix b/home/programs/terminal/tools/default.nix index 6ece1ab..00fcb55 100644 --- a/home/programs/terminal/tools/default.nix +++ b/home/programs/terminal/tools/default.nix @@ -12,5 +12,6 @@ _: { ./btop.nix ./bottom.nix ./bat.nix + ./nix-index.nix ]; } diff --git a/home/programs/terminal/tools/nix-index.nix b/home/programs/terminal/tools/nix-index.nix new file mode 100644 index 0000000..241e136 --- /dev/null +++ b/home/programs/terminal/tools/nix-index.nix @@ -0,0 +1,15 @@ +{ config, ... }: { + programs = { + # nix-index is a file database for nixpkgs + # this provides `nix-locate` command. + nix-index = { + enable = true; + enableBashIntegration = config.programs.bash.enable; + enableZshIntegration = config.programs.zsh.enable; + }; + + # Allows interactive shells to show which Nix package (if any) + # provides a missing command. + command-not-found.enable = true; + }; +}