From a34f5dbcaaee5ce4215ee6cd8df341d6140f3ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 27 Apr 2025 16:39:59 +0200 Subject: nixos/lipwig: add Forgejo This is to test it. It is nice but I most likely won't stay with it. It doesn't have the federation in the level I would expect to move away from Gitlab.com as a central server. --- nixos/configurations/lipwig.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'nixos') diff --git a/nixos/configurations/lipwig.nix b/nixos/configurations/lipwig.nix index 9e83a72..bd1926e 100644 --- a/nixos/configurations/lipwig.nix +++ b/nixos/configurations/lipwig.nix @@ -103,6 +103,12 @@ fastcgi_param HTTP_HOST $server_name; ''; }; + "forgejo.cynerd.cz" = { + forceSSL = true; + useACMEHost = "cynerd.cz"; + locations."/".proxyPass = "http://127.0.0.1:${toString config.services.forgejo.settings.server.HTTP_PORT}/"; + extraConfig = "client_max_body_size 512M;"; + }; "cloud.cynerd.cz" = { forceSSL = true; useACMEHost = "cynerd.cz"; @@ -140,6 +146,7 @@ certs."cynerd.cz".extraDomainNames = [ "cloud.cynerd.cz" "office.cynerd.cz" + "forgejo.cynerd.cz" "git.cynerd.cz" "grafana.cynerd.cz" "searx.cynerd.cz" @@ -196,6 +203,27 @@ scan-path=/var/lib/git/repositories/ ''; + services.forgejo = { + enable = true; + database.type = "postgres"; + lfs.enable = true; + settings = { + server = { + DOMAIN = "forgejo.cynerd.cz"; + # You need to specify this to remove the port from URLs in the web UI. + ROOT_URL = "https://${config.services.forgejo.settings.server.DOMAIN}/"; + HTTP_PORT = 3001; + }; + # You can temporarily allow registration to create an admin user. + service.DISABLE_REGISTRATION = true; + # Add support for actions, based on act: https://github.com/nektos/act + actions = { + ENABLED = true; + DEFAULT_ACTIONS_URL = "github"; + }; + }; + }; + # Nextcloud ################################################################ services.nextcloud = { enable = true; -- cgit v1.2.3