diff --git a/README.md b/README.md index 8d3b8485..63e9a526 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,15 @@ Include the nixos module in your configuration: modules = [ ./configuration.nix nix-index-database.nixosModules.nix-index - # optional to also wrap and install comma - # { programs.nix-index-database.comma.enable = true; } + + { + programs = { + # Optionally wrap and install pkgs.comma. + nix-index-database.comma.enable = true; + + nix-index.enable = true; + }; + } ]; }; }; @@ -73,8 +80,15 @@ You can then call `nix-locate` as usual, it will automatically use the database modules = [ ./configuration.nix nix-index-database.darwinModules.nix-index - # optional to also wrap and install comma - # { programs.nix-index-database.comma.enable = true; } + + { + programs = { + # Optionally wrap and install pkgs.comma. + nix-index-database.comma.enable = true; + + nix-index.enable = true; + }; + } ]; }; }; @@ -114,8 +128,15 @@ You can then call `nix-locate` as usual, it will automatically use the database modules = [ nix-index-database.hmModules.nix-index - # optional to also wrap and install comma - # { programs.nix-index-database.comma.enable = true; } + + { + programs = { + # Optionally wrap and install pkgs.comma. + nix-index-database.comma.enable = true; + + nix-index.enable = true; + }; + } ]; }; }; diff --git a/nix/shared.nix b/nix/shared.nix index 7c45580a..3daecd6b 100644 --- a/nix/shared.nix +++ b/nix/shared.nix @@ -2,6 +2,4 @@ options = { programs.nix-index-database.comma.enable = lib.mkEnableOption "wrapping comma with nix-index-database and put it in the PATH"; }; - - config.programs.nix-index.enable = lib.mkDefault true; } diff --git a/tests.nix b/tests.nix index b42fc06d..673baddf 100644 --- a/tests.nix +++ b/tests.nix @@ -17,7 +17,11 @@ { programs.command-not-found.enable = false; - programs.nix-index-database.comma.enable = true; + programs = { + nix-index-database.comma.enable = true; + nix-index.enable = true; + }; + # Point comma at our nixpkgs instance. # Passing --nixpkgs-flake instead seems to fail when nix tries to use the network. nix.nixPath = [ "nixpkgs=${nixpkgs}" ];