forgejo: move domain from being machine-specific to public

This commit is contained in:
Nico 2026-02-22 20:14:59 +11:00
parent b23be17545
commit 90ba20d2cc
Signed by: nico
SSH key fingerprint: SHA256:XuacYOrGqRxC3jVFjfLROn1CSvLz85Dec6N7O9Gwu/0

View file

@ -10,7 +10,7 @@
settings = { settings = {
session.COOKIE_SECURE = true; session.COOKIE_SECURE = true;
server = { server = {
DOMAIN = "git.${config.homelab.domain}"; DOMAIN = "git.${config.homelab.publicDomain}";
ROOT_URL = "https://${config.services.forgejo.settings.server.DOMAIN}"; ROOT_URL = "https://${config.services.forgejo.settings.server.DOMAIN}";
SSH_PORT = 22; SSH_PORT = 22;
# PROTOCOL = "https"; # PROTOCOL = "https";
@ -30,7 +30,7 @@
# in order to only allow that to the forgejo user as it has "/var" # in order to only allow that to the forgejo user as it has "/var"
services.openssh.authorizedKeysInHomedir = lib.mkForce true; services.openssh.authorizedKeysInHomedir = lib.mkForce true;
services.caddy.virtualHosts."git.${config.homelab.domain}" = { services.caddy.virtualHosts."git.${config.homelab.publicDomain}" = {
useACMEHost = config.homelab.domain; useACMEHost = config.homelab.domain;
extraConfig = '' extraConfig = ''
reverse_proxy http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT} reverse_proxy http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}