From 1fd2a350fcaec156115e0f7341641885b8a979d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey=20=28they/them=29?= Date: Fri, 6 Mar 2026 19:57:00 -0800 Subject: [PATCH] feat(home): add nix-index-database flake input Wire up the nix-index-database flake to provide the comma binary with a pre-built nix-index database. Removes the manually-installed pkgs.comma in favor of the module-managed version. Co-Authored-By: Claude Haiku 4.5 --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 4 ++++ lib/hosts.nix | 2 ++ modules/home/utilities.nix | 6 +++++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index ccf3f151..0c50db08 100644 --- a/flake.lock +++ b/flake.lock @@ -290,6 +290,26 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772341813, + "narHash": "sha256-/PQ0ubBCMj/MVCWEI/XMStn55a8dIKsvztj4ZVLvUrQ=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "a2051ff239ce2e8a0148fa7a152903d9a78e854f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1771969195, @@ -350,6 +370,7 @@ "llm-profile": "llm-profile", "nix-darwin": "nix-darwin", "nix-homebrew": "nix-homebrew", + "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable", diff --git a/flake.nix b/flake.nix index 9bb7bf2c..f631cee7 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,10 @@ url = "github:cachix/git-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-index-database = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nixos-hardware.url = "github:NixOS/nixos-hardware"; # Linux diff --git a/lib/hosts.nix b/lib/hosts.nix index 84dd66e7..e14c0177 100644 --- a/lib/hosts.nix +++ b/lib/hosts.nix @@ -9,6 +9,7 @@ inputs @ { homebrew-core, homebrew-cask, llm-profile, + nix-index-database, zx-dev, disko, golink, @@ -35,6 +36,7 @@ inputs @ { home-manager.users.${username} = {...}: { imports = [ + nix-index-database.hmModules.nix-index agenix.homeManagerModules.default ./../modules/home ./../home diff --git a/modules/home/utilities.nix b/modules/home/utilities.nix index a512b687..9f0281f9 100644 --- a/modules/home/utilities.nix +++ b/modules/home/utilities.nix @@ -85,9 +85,13 @@ in { }) (mkIf cfg.nix.enable { + programs.nix-index = { + enable = true; + }; + programs.nix-index-database.comma.enable = true; + home.packages = [ - pkgs.comma pkgs.manix pkgs.nix-du pkgs.nix-tree