all repos — searchix @ a5e758d41c151c17ed03b39454470ba8dd0c3b99

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: separate fetch and import logic

Alan Pearce
commit

a5e758d41c151c17ed03b39454470ba8dd0c3b99

parent

d558039919b6198a246a6a3fd007276191cb4b2f

1 file changed, 12 insertions(+), 7 deletions(-)

changed files
M internal/config/config.gointernal/config/config.go
@@ -115,12 +115,13 @@ "nixos": {
Name: "NixOS", Key: "nixos", Enable: true, - Type: Channel, + Importer: Options, + Fetcher: Channel, Channel: "nixpkgs", URL: "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz", ImportPath: "nixos/release.nix", Attribute: "options", - OutputPath: "share/doc/nixos/options.json", + OutputPath: "share/doc/nixos", FetchTimeout: 5 * time.Minute, ImportTimeout: 15 * time.Minute, Repo: nixpkgs,
@@ -129,12 +130,13 @@ "darwin": {
Name: "Darwin", Key: "darwin", Enable: false, - Type: Channel, + Importer: Options, + Fetcher: Channel, Channel: "darwin", URL: "https://github.com/LnL7/nix-darwin/archive/master.tar.gz", ImportPath: "release.nix", Attribute: "options", - OutputPath: "share/doc/darwin/options.json", + OutputPath: "share/doc/darwin", FetchTimeout: 5 * time.Minute, ImportTimeout: 15 * time.Minute, Repo: Repository{
@@ -147,12 +149,13 @@ "home-manager": {
Name: "Home Manager", Key: "home-manager", Enable: false, + Importer: Options, Channel: "home-manager", URL: "https://github.com/nix-community/home-manager/archive/master.tar.gz", - Type: Channel, + Fetcher: Channel, ImportPath: "default.nix", Attribute: "docs.json", - OutputPath: "share/doc/home-manager/options.json", + OutputPath: "share/doc/home-manager", FetchTimeout: 5 * time.Minute, ImportTimeout: 15 * time.Minute, Repo: Repository{
@@ -165,7 +168,9 @@ "nixpkgs": {
Name: "Nix Packages", Key: "nixpkgs", Enable: true, - Type: ChannelNixpkgs, + Importer: Packages, + Fetcher: ChannelNixpkgs, + Channel: "nixos-unstable", OutputPath: "packages.json.br", FetchTimeout: 5 * time.Minute, ImportTimeout: 15 * time.Minute,