From 51f774aaced998ad3c7c31e370aea22cc2fdbbc5 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 16 May 2024 17:09:10 +0200 Subject: feat(importer): process packages from nixpkgs package.json --- internal/config/config.go | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'internal/config') diff --git a/internal/config/config.go b/internal/config/config.go index 490d1d5..eb46270 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -87,6 +87,12 @@ type Config struct { Importer *Importer } +var nixpkgs = Repository{ + Type: "github", + Owner: "NixOS", + Repo: "nixpkgs", +} + var defaultConfig = Config{ DataPath: "./data", Web: &Web{ @@ -117,11 +123,7 @@ var defaultConfig = Config{ OutputPath: "share/doc/nixos/options.json", FetchTimeout: 5 * time.Minute, ImportTimeout: 15 * time.Minute, - Repo: Repository{ - Type: "github", - Owner: "NixOS", - Repo: "nixpkgs", - }, + Repo: nixpkgs, }, "darwin": { Name: "Darwin", @@ -159,6 +161,16 @@ var defaultConfig = Config{ Repo: "home-manager", }, }, + "nixpkgs": { + Name: "Nix Packages", + Key: "nixpkgs", + Enable: true, + Type: ChannelNixpkgs, + OutputPath: "packages.json.br", + FetchTimeout: 5 * time.Minute, + ImportTimeout: 15 * time.Minute, + Repo: nixpkgs, + }, }, }, } -- cgit 1.4.1