dotfiles/home/features/cli/nix-index.nix
2023-12-10 15:06:51 -06:00

14 lines
320 B
Nix

{ 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;
};
programs.command-not-found.enable = false;
}