From aad7eea00918f62c8bb3d9cc79d6e99f7663e4ac Mon Sep 17 00:00:00 2001 From: Tilman Andre Mix Date: Mon, 9 Sep 2024 20:28:18 +0200 Subject: [PATCH] doc: add documentation for gitea fetcher Signed-off-by: Tilman Andre Mix --- src/nix/flake.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/nix/flake.md b/src/nix/flake.md index d8ee4ac71..21ddbe468 100644 --- a/src/nix/flake.md +++ b/src/nix/flake.md @@ -364,6 +364,33 @@ Currently the `type` attribute can be one of the following: * `sourcehut:~misterio/nix-colors/182b4b8709b8ffe4e9774a4c5d6877bf6bb9a21c` * `sourcehut:~misterio/nix-colors/21c1a380a6915d890d408e9f22203436a35bb2de?host=hg.sr.ht` +* `gitea`: Similar to `github`, is a more efficient way to fetch + Gitea/Forgejo repositories. The default host is `codeberg.org`. + The following attributes are required: + + * `owner`: The owner of the repository. + + * `repo`: The name of the repository. + + Like `github`, these are downloaded as tarball archives. + + The URL syntax for `gitea` flakes is: + + `gitea:/(/)?(\?)?` + + `` works the same as `github`. Either a branch or tag name + (`ref`), or a commit hash (`rev`) can be specified. + + Since Gitea/Forgejo allows for self-hosting, you can specify `host` as + a parameter, to point to any instances other than `codeberg.org`. + + Some examples: + + * `gitea:redict/redict` + * `gitea:redict/redict/main` + * `gitea:redict/redict/a4c81102327bc2c74d229784a1d1dd680c708918` + * `gitea:lix-project/lix?host=git.lix.systems` + # Flake format As an example, here is a simple `flake.nix` that depends on the