about summary refs log tree commit diff stats
path: root/internal/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go50
1 files changed, 42 insertions, 8 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 94bf60e..2cf5def 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -7,6 +7,7 @@ import (
 	"os"
 	"searchix/internal/file"
 	"searchix/internal/importer"
+	"time"
 
 	"github.com/pelletier/go-toml/v2"
 	"github.com/pkg/errors"
@@ -42,20 +43,53 @@ var defaultConfig = Config{
 		"x-content-type-options": "nosniff",
 	},
 	Sources: map[string]importer.Source{
-		"nixos": importer.Source{
-			Name:       "NixOS",
-			Enable:     true,
-			Type:       importer.Channel,
-			Channel:    "nixos-unstable",
-			ImportPath: "nixos/release.nix",
-			Attribute:  "options",
-			OutputPath: "share/doc/nixos/options.json",
+		"nixos": {
+			Name:          "NixOS",
+			Enable:        true,
+			Type:          importer.Channel,
+			Channel:       "nixpkgs",
+			ImportPath:    "nixos/release.nix",
+			Attribute:     "options",
+			OutputPath:    "share/doc/nixos/options.json",
+			FetchTimeout:  5 * time.Minute,
+			ImportTimeout: 15 * time.Minute,
 			Repo: importer.Repository{
 				Type:  "github",
 				Owner: "NixOS",
 				Repo:  "nixpkgs",
 			},
 		},
+		"darwin": {
+			Name:          "darwin",
+			Enable:        false,
+			Type:          importer.Channel,
+			Channel:       "nix-darwin",
+			ImportPath:    "release.nix",
+			Attribute:     "options",
+			OutputPath:    "share/doc/darwin/options.json",
+			FetchTimeout:  5 * time.Minute,
+			ImportTimeout: 15 * time.Minute,
+			Repo: importer.Repository{
+				Type:  "github",
+				Owner: "LnL7",
+				Repo:  "nix-darwin",
+			},
+		},
+		"home-manager": {
+			Name:          "home-manager",
+			Enable:        false,
+			Type:          importer.Channel,
+			ImportPath:    "default.nix",
+			Attribute:     "docs.json",
+			OutputPath:    "share/doc/home-manager/options.json",
+			FetchTimeout:  5 * time.Minute,
+			ImportTimeout: 15 * time.Minute,
+			Repo: importer.Repository{
+				Type:  "github",
+				Owner: "nix-community",
+				Repo:  "home-manager",
+			},
+		},
 	},
 }