From 44adb7d61e71370acb7d839e6b76270f9a081939 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 1 Jan 2026 18:45:23 -0600 Subject: Command not found: nix-index --- configuration.nix | 4 ++++ flake.lock | 21 +++++++++++++++++++++ flake.nix | 7 ++++++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index e0d8eb3..7457d3b 100644 --- a/configuration.nix +++ b/configuration.nix @@ -92,6 +92,10 @@ rebuild = "sudo nixos-rebuild switch --flake /etc/nixos"; }; + programs.nix-index.enable = true; + programs.nix-index-database.comma.enable = true; + programs.command-not-found.enable = false; + # This option defines the first version of NixOS you have installed on this particular machine, # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. # diff --git a/flake.lock b/flake.lock index 6e44a49..c877d97 100644 --- a/flake.lock +++ b/flake.lock @@ -21,6 +21,26 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765267181, + "narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1767047869, @@ -40,6 +60,7 @@ "root": { "inputs": { "home-manager": "home-manager", + "nix-index-database": "nix-index-database", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 944af4c..c7d4742 100644 --- a/flake.nix +++ b/flake.nix @@ -9,9 +9,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + + nix-index-database.url = "github:nix-community/nix-index-database"; + nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, nixpkgs, home-manager, ... }@inputs: { + outputs = { self, nixpkgs, home-manager, nix-index-database, ... }@inputs: { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; @@ -19,6 +22,8 @@ modules = [ ./configuration.nix + nix-index-database.nixosModules.nix-index + home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; -- cgit v1.2.3