add nix-index as command-not-found

This commit is contained in:
John Bowdre 2023-11-04 22:26:20 -05:00
parent 6dd50a4c29
commit 5942437eeb
2 changed files with 13 additions and 0 deletions

View file

@ -5,6 +5,7 @@
./exa.nix ./exa.nix
./git.nix ./git.nix
./fish.nix ./fish.nix
./nix-index.nix
./tmux.nix ./tmux.nix
./vim.nix ./vim.nix
]; ];

View file

@ -0,0 +1,12 @@
{ pkgs, lib, config, ... }:
let
inherit (lib) mkIf;
hasPackage = pname: lib.any (p: p ? pname && p.name == pname) config.home.packages;
hasFish = hasPackage "fish";
in
{
programs.nix-index = {
enable = true;
enableFishIntegration = mkIf hasFish true;
};
}