From 52741955630cbe5de069e8a6789b5a892231f7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Tue, 14 Mar 2023 13:33:48 +0100 Subject: [PATCH] feat: add gitea server --- hosts/hydrogen/configuration.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/hosts/hydrogen/configuration.nix b/hosts/hydrogen/configuration.nix index 2f1744e..462ac4c 100644 --- a/hosts/hydrogen/configuration.nix +++ b/hosts/hydrogen/configuration.nix @@ -144,6 +144,25 @@ environment.systemPackages = with pkgs; [ htop ]; + services.gitea = { + enable = true; + domain = "git.fainsin.bzh"; + rootUrl = "https://git.fainsin.bzh"; + lfs.enable = true; + database.type = "postgres"; + settings = { + service = { + "DEFAULT_KEEP_EMAIL_PRIVATE" = true; + "DISABLE_REGISTRATION" = true; + }; + server = { "LANDING_PAGE" = "explore"; }; + session = { + "PROVIDER" = "db"; + "COOKIE_SECURE" = true; + }; + }; + }; + services.nginx = { enable = true; @@ -171,6 +190,14 @@ forceSSL = true; root = "/srv/www/"; }; + "git.fainsin.bzh" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://localhost:3000/"; + proxyWebsockets = true; + }; + }; default = { default = true; locations."/".return = ''301 "$scheme://fainsin.bzh" '';