diff --git a/bert/configuration.nix b/bert/configuration.nix index 2251ddd..f9a6c33 100644 --- a/bert/configuration.nix +++ b/bert/configuration.nix @@ -7,6 +7,7 @@ ./services/factorio.nix ./services/http/index.nix ./services/monitoring.nix + ./services/forgejo.nix ]; # Bootloader diff --git a/bert/services/forgejo.nix b/bert/services/forgejo.nix new file mode 100644 index 0000000..9d7d619 --- /dev/null +++ b/bert/services/forgejo.nix @@ -0,0 +1,19 @@ +{ + services.forgejo = { + enable = true; + settings = { + DEFAULT = { + APP_NAME = "Forgejo: Beyond coding. We Forge."; # TODO + }; + server = { + # USE_PROXY_PROTOCOL = true; + DOMAIN = "git.chandlerswift.com"; + #SSH_DOMAIN = "git.chandlerswift.com"; + ROOT_URL = "https://git.chandlerswift.com/"; + HTTP_PORT = 3001; + LANDING_PAGE = "/chandlerswift"; + }; + service.DISABLE_REGISTRATION = true; + }; + }; +} diff --git a/bert/services/http/git.chandlerswift.com.nix b/bert/services/http/git.chandlerswift.com.nix new file mode 100644 index 0000000..609c95f --- /dev/null +++ b/bert/services/http/git.chandlerswift.com.nix @@ -0,0 +1,5 @@ +{config, ...}: { + services.caddy.virtualHosts."git.chandlerswift.com".extraConfig = '' + reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT} + ''; +} diff --git a/bert/services/http/index.nix b/bert/services/http/index.nix index 6b0430a..51e12c7 100644 --- a/bert/services/http/index.nix +++ b/bert/services/http/index.nix @@ -1,6 +1,7 @@ { imports = [ ./files.chandlerswift.com.nix + ./git.chandlerswift.com.nix ./home.chandlerswift.com.nix ./maps.chandlerswift.com.nix ./stjohnscccc.org.nix