diff --git a/hosts/orion/configuration.nix b/hosts/orion/configuration.nix index b9897cf..502a280 100644 --- a/hosts/orion/configuration.nix +++ b/hosts/orion/configuration.nix @@ -18,6 +18,7 @@ ../../server-modules/glance.nix ../../server-modules/radicale.nix ../../server-modules/actual-budget.nix + ../../server-modules/gitea.nix ./disk-config.nix ./hardware-configuration.nix diff --git a/server-modules/gitea.nix b/server-modules/gitea.nix new file mode 100644 index 0000000..8924887 --- /dev/null +++ b/server-modules/gitea.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: +{ + services.gitea = { + enable = true; + appName = "Git Server"; # A name for your Gitea instance + settings = { + server = { + PROTOCOL = "http"; # Use http for now, caddy will handle https + DOMAIN = "git.jelles.net"; + ROOT_URL = "https://git.jelles.net/"; + HTTP_ADDR = "127.0.0.1"; + HTTP_PORT = 3001; + DISABLE_SSH = true; # Disable the built-in SSH server, use HTTPS for cloning + }; + + service = { + DISABLE_REGISTRATION = true; # Consider enabling for public instances + }; + }; + }; + + services.caddy.virtualHosts."git.jelles.net".extraConfig = "reverse_proxy :3001"; +}