From 79904a3ded3a1b3aaa7a57bc74ca4d4f4eb83a8b Mon Sep 17 00:00:00 2001 From: osbm Date: Sat, 1 Mar 2025 23:17:39 +0300 Subject: [PATCH] add reverse proxy for git server --- hosts/pochita/configuration.nix | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/hosts/pochita/configuration.nix b/hosts/pochita/configuration.nix index 3489dd7..cbbf7ff 100644 --- a/hosts/pochita/configuration.nix +++ b/hosts/pochita/configuration.nix @@ -28,8 +28,32 @@ # enable forgejo services.forgejo = { enable = true; - # port = 8080; + settings = { + server = { + DOMAIN = "git.osbm.dev"; + ROOT_URL = "https://git.osbm.dev"; + }; + service = { + DISABLE_REGISTRATION = false; + }; + }; }; + + # i configured so that the git.osbm.dev domain points to tailscale domain + # git.osbm.dev -> pochita.curl-boga.ts.net + # and i want everyone to see the repositories in the git.osbm.dev domain + # but only i want to make changes, login, etc + # so i disabled registration + services.caddy = { + enable = true; + email = "contact@osbm.dev"; + config = '' + git.osbm.dev { + reverse_proxy localhost:3000 + } + ''; + }; + networking.hostName = "pochita"; # log of shame: osbm blamed nix when he wrote "hostname" instead of "hostName"