Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
}
];
};
};
Expand Down Expand Up @@ -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;
};
}
];
};
};
Expand Down Expand Up @@ -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;
};
}
];
};
};
Expand Down
2 changes: 0 additions & 2 deletions nix/shared.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
6 changes: 5 additions & 1 deletion tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}" ];
Expand Down