diff options
author | Alan Pearce | 2025-03-20 13:08:25 +0100 |
---|---|---|
committer | Alan Pearce | 2025-03-20 13:12:54 +0100 |
commit | 2705e97ce1cf7d6a399c5f0175c36562fdef3352 (patch) | |
tree | 95c78a494471ff60ec87b9d64099c94ccec2f140 /internal/config | |
parent | ff1e9539fca1f011cfd52d0309a373f211c3fd10 (diff) | |
download | searchix-2705e97ce1cf7d6a399c5f0175c36562fdef3352.tar.lz searchix-2705e97ce1cf7d6a399c5f0175c36562fdef3352.tar.zst searchix-2705e97ce1cf7d6a399c5f0175c36562fdef3352.zip |
feat: enable NUR package import
Diffstat (limited to 'internal/config')
-rw-r--r-- | internal/config/default.go | 20 | ||||
-rw-r--r-- | internal/config/structs.go | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/internal/config/default.go b/internal/config/default.go index 9208a33..5260fe9 100644 --- a/internal/config/default.go +++ b/internal/config/default.go @@ -66,6 +66,7 @@ var DefaultConfig = Config{ OutputPath: "share/doc/nixos", Timeout: Duration{5 * time.Minute}, Repo: nixpkgs, + JSONDepth: 1, }, "darwin": { Name: "Darwin", @@ -85,6 +86,7 @@ var DefaultConfig = Config{ Owner: "LnL7", Repo: "nix-darwin", }, + JSONDepth: 1, }, "home-manager": { Name: "Home Manager", @@ -104,6 +106,7 @@ var DefaultConfig = Config{ Owner: "nix-community", Repo: "home-manager", }, + JSONDepth: 1, }, "nixpkgs": { Name: "Nix Packages", @@ -120,6 +123,23 @@ var DefaultConfig = Config{ Enable: true, Attribute: "programs.sqlite", }, + JSONDepth: 2, + }, + "nur": { + Name: "NUR", + Order: 4, + Key: "nur", + Enable: false, + Importer: Packages, + Fetcher: Download, + URL: "https://alanpearce.github.io/nix-options/nur", + Timeout: Duration{5 * time.Minute}, + Repo: Repository{ + Type: GitHub, + Owner: "nix-community", + Repo: "nur", + }, + JSONDepth: 1, }, }, }, diff --git a/internal/config/structs.go b/internal/config/structs.go index 8c69733..30ad975 100644 --- a/internal/config/structs.go +++ b/internal/config/structs.go @@ -50,6 +50,7 @@ type Source struct { OutputPath string `comment:"(Fetcher=channel) Path under ./result symlink to folder containing {options,packages}.json."` Repo Repository `comment:"Used to generate declaration/definition links"` Programs ProgramsDB `comment:"Used to enable searching for programs in multi-program packages"` + JSONDepth int `comment:"Depth at which packages/object object is to be found"` } type ProgramsDB struct { |