mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-25 18:42:19 +00:00
add nix-index as command-not-found
This commit is contained in:
parent
6dd50a4c29
commit
5942437eeb
2 changed files with 13 additions and 0 deletions
|
@ -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
|
||||||
];
|
];
|
||||||
|
|
12
home/features/cli/nix-index.nix
Normal file
12
home/features/cli/nix-index.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue