From 27ece0ea89c14e27869beee20dc13b03dbc950fa Mon Sep 17 00:00:00 2001 From: coolneng Date: Sat, 11 Feb 2023 15:18:44 +0100 Subject: [PATCH] Replace command-not-found with nix-index --- configuration.nix | 7 +++++++ flake.nix | 12 ++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configuration.nix b/configuration.nix index 9060e9b..6b50669 100644 --- a/configuration.nix +++ b/configuration.nix @@ -156,6 +156,13 @@ with pkgs; # Enable fish package completion programs.fish.enable = true; + # Enable nix-index + programs.command-not-found.enable = false; + programs.nix-index = { + enable = true; + enableFishIntegration = true; + }; + # Import other configuration modules imports = [ ./modules/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index d86fec4..a29fd45 100644 --- a/flake.nix +++ b/flake.nix @@ -23,9 +23,13 @@ url = "github:robn/sasl2-oauth"; flake = false; }; + nix-index-database = { + url = "github:Mic92/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, agenix, ... }@inputs: + outputs = { self, nixpkgs, agenix, nix-index-database, ... }@inputs: let system = "x86_64-linux"; @@ -36,7 +40,11 @@ in { nixosConfigurations.panacea = lib.nixosSystem { inherit system; - modules = [ (import ./configuration.nix) agenix.nixosModules.age ]; + modules = [ + (import ./configuration.nix) + agenix.nixosModules.age + nix-index-database.nixosModules.nix-index + ]; specialArgs = { inherit inputs; }; };