From 19805b91322878264cc235c880c04fdabafa0949 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Tue, 25 Jun 2024 20:44:22 -0400 Subject: Try out Gitea DISABLE_REGISTRATION needs to be set after the initial administrator account is manually registered. Considered the Forgejo community fork, but it doesn't seem to have attracted very much of the developer community. Despite concerns about copyright claims, Gitea does not have a CLA; it is MIT licensed. Still considering even lighter weight options that may be easier to programmatically control (just an HTTP server that speaks the smart protocol?). For managing groups of repositories, can use labels or organizations. Neither seem particularly convenient. Gitea defaults to public repositories. --- hostnix/elmo/configuration.nix | 1 + hostnix/elmo/git.nix | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 hostnix/elmo/git.nix diff --git a/hostnix/elmo/configuration.nix b/hostnix/elmo/configuration.nix index d143dae..ec06b26 100644 --- a/hostnix/elmo/configuration.nix +++ b/hostnix/elmo/configuration.nix @@ -6,6 +6,7 @@ ./dns.nix ./dyndns.nix ./email.nix + ./git.nix ./hardware-configuration.nix ./home-assistant.nix ./oidc.nix diff --git a/hostnix/elmo/git.nix b/hostnix/elmo/git.nix new file mode 100644 index 0000000..c032b5d --- /dev/null +++ b/hostnix/elmo/git.nix @@ -0,0 +1,23 @@ +{ ... }: + +{ + services.gitea = { + enable = true; + settings = { + server = { + ROOT_URL = "https://git.mou.fo/"; + PROTOCOL = "http+unix"; + DISABLE_REGISTRATION = true; + }; + session = { + COOKIE_SECURE = true; + }; + }; + }; + + services.nginx.virtualHosts."git.mou.fo" = { + enableACME = true; + forceSSL = true; + locations."/".proxyPass = "http://unix:/run/gitea/gitea.sock"; + }; +} -- cgit v1.3.1