diff --git a/flake.lock b/flake.lock index e474b9e..76ea744 100644 --- a/flake.lock +++ b/flake.lock @@ -601,6 +601,26 @@ "type": "github" } }, + "nix-index-db": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729394935, + "narHash": "sha256-2ntUG+NJKdfhlrh/tF+jOU0fOesO7lm5ZZVSYitsvH8=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "04f8a11f247ba00263b060fbcdc95484fd046104", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1729509737, @@ -2650,6 +2670,7 @@ "home-manager": "home-manager_2", "lanzaboote": "lanzaboote", "niri": "niri", + "nix-index-db": "nix-index-db", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_5", "nvf": "nvf", diff --git a/flake.nix b/flake.nix index f1d5fae..01cc2c1 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,10 @@ url = "github:nix-community/lanzaboote/v0.4.1"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-index-db = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; treefmt-nix.url = "github:numtide/treefmt-nix"; nixos-hardware.url = "github:NixOS/nixos-hardware"; }; diff --git a/home/terminal/programs/default.nix b/home/terminal/programs/default.nix index 0614717..9a6ec9c 100644 --- a/home/terminal/programs/default.nix +++ b/home/terminal/programs/default.nix @@ -5,6 +5,7 @@ ./tmux.nix ./direnv.nix ./zellij.nix + ./nix-index.nix ]; home.packages = with pkgs; [ diff --git a/home/terminal/programs/nix-index.nix b/home/terminal/programs/nix-index.nix new file mode 100644 index 0000000..04a55a2 --- /dev/null +++ b/home/terminal/programs/nix-index.nix @@ -0,0 +1,11 @@ +{inputs, ...}: { + imports = [inputs.nix-index-db.hmModules.nix-index]; + programs = { + nix-index = { + enable = true; + symlinkToCacheHome = true; # needed for comma + }; + command-not-found.enable = false; + nix-index-database.comma.enable = true; + }; +}