From d56605e37aa3255bd244c8e107f98bcb91086127 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Thu, 12 Mar 2026 07:33:46 +0100 Subject: [PATCH] Add nix-index-database and comma --- flake.nix | 8 +++++++- homes/julian/features/suites/cli/default.nix | 1 - homes/julian/global/default.nix | 5 +++++ hosts/common/global/nix.nix | 6 +----- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index bc5b99a..cbd5cf8 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,10 @@ url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-index-database = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -94,7 +98,9 @@ nixosConfigurations = { # Main laptop aspi = lib.nixosSystem { - modules = [./hosts/aspi]; + modules = [ + ./hosts/aspi + ]; specialArgs = { inherit inputs outputs; }; diff --git a/homes/julian/features/suites/cli/default.nix b/homes/julian/features/suites/cli/default.nix index 42d2bd6..62fc9ac 100644 --- a/homes/julian/features/suites/cli/default.nix +++ b/homes/julian/features/suites/cli/default.nix @@ -19,7 +19,6 @@ links2 # Tui web-browser lnav # log analyzing tool mc # Tui file browser - # nix-index nmap p7zip # unzip 7zip archives parted diff --git a/homes/julian/global/default.nix b/homes/julian/global/default.nix index 642edb0..bb8021d 100644 --- a/homes/julian/global/default.nix +++ b/homes/julian/global/default.nix @@ -2,6 +2,7 @@ lib, pkgs, config, + inputs, outputs, ... }: { @@ -9,6 +10,7 @@ [ ../features/fonts ../features/nix-helper + inputs.nix-index-database.homeModules.default # nix-locate ] ++ (builtins.attrValues outputs.homeManagerModules); @@ -36,6 +38,9 @@ programs = { home-manager.enable = true; git.enable = true; + + nix-index.enable = true; # allows command-not-found + nix-index-database.comma.enable = true; }; home = { diff --git a/hosts/common/global/nix.nix b/hosts/common/global/nix.nix index 0fb3b3e..1b282e9 100644 --- a/hosts/common/global/nix.nix +++ b/hosts/common/global/nix.nix @@ -1,8 +1,4 @@ -{ - lib, - outputs, - ... -}: { +{outputs, ...}: { # Apply overlays nixpkgs = { # TODO: apply this to hm and nixos without duplicate code