diff --git a/hosts/Alaska/default.nix b/hosts/Alaska/default.nix index 40ddb7f..c295eb9 100644 --- a/hosts/Alaska/default.nix +++ b/hosts/Alaska/default.nix @@ -8,6 +8,7 @@ (import ./modules/nginx.nix) (import ./modules/nextcloud.nix) (import ./modules/msmtp.nix) + (import ./modules/forgejo.nix) ]; environment.systemPackages = [ diff --git a/hosts/Alaska/modules/forgejo.nix b/hosts/Alaska/modules/forgejo.nix new file mode 100644 index 0000000..7c315c8 --- /dev/null +++ b/hosts/Alaska/modules/forgejo.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +{ + services.gitea = { + enable = true; + package = pkgs.forgejo; + stateDir = "/Aurora/Forgejo"; + + settings = { + + #ui.DEFAULT_THEME = "arc-green"; + # Enable this after the first user has been created + #service.DISABLE_REGISTRATION = true; + + session.COOKIE_SECURE = true; + # external facing ui + server = { + ROOT_URL = "https://git.nickiel.net"; + HTTP_PORT = 3001; + DOMAIN = "git.nickiel.net"; + LANDING_PAGE = "/explore/repos"; + }; + }; + }; +} diff --git a/hosts/Alaska/modules/nginx.nix b/hosts/Alaska/modules/nginx.nix index 85ede78..8ddfdf6 100644 --- a/hosts/Alaska/modules/nginx.nix +++ b/hosts/Alaska/modules/nginx.nix @@ -36,6 +36,12 @@ forceSSL = true; enableACME = true; }; + + "git.nickiel.net" = { + forceSSL = true; + enableACME = true; + locations."/".proxyPass = "http://127.0.0.1:3001"; + }; }; }; }