blob: 003a6fd498a0a6a1dca3a1b7c10b5c730f638cc0 [file] [log] [blame]
Samuel Shuert73a9d282024-02-23 18:43:32 +00001{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7{
8 options = {
9 chimera.nixIndex.enable = lib.mkOption {
10 type = lib.types.bool;
11 description = "Enables nix-index (from nix-index-database)";
12 default = true;
13 example = false;
14 };
15
16 chimera.nixIndex.comma.enable = lib.mkOption {
17 type = lib.types.bool;
18 description = "Enables nix-community/comma";
19 default = true;
20 example = false;
21 };
22 };
23
24 config = {
25 xdg.enable = lib.mkIf config.chimera.nixIndex.enable true;
26
27 programs.nix-index = {
28 enable = config.chimera.nixIndex.enable;
29 enableBashIntegration = config.chimera.shell.bash.enable;
30 enableZshIntegration = config.chimera.shell.zsh.enable;
31 };
32
33 programs.nix-index-database.comma.enable = lib.mkIf config.chimera.nixIndex.enable config.chimera.nixIndex.comma.enable;
34 };
35}