2024-08-31 02:15:09 +00:00
|
|
|
{ lib, pkgs, ... }:
|
2024-08-25 15:02:35 +00:00
|
|
|
{
|
2024-08-11 10:13:36 +00:00
|
|
|
services.forgejo = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.forgejo;
|
|
|
|
database.type = "postgres";
|
|
|
|
settings = {
|
2024-08-27 09:08:53 +00:00
|
|
|
DEFAULT = {
|
|
|
|
APP_NAME = "git.ny4.dev";
|
|
|
|
};
|
|
|
|
|
2024-08-11 10:13:36 +00:00
|
|
|
server = {
|
|
|
|
DOMAIN = "git.ny4.dev";
|
|
|
|
PROTOCOL = "http+unix";
|
|
|
|
ROOT_URL = "https://git.ny4.dev/";
|
|
|
|
SSH_DOMAIN = "tyo0.ny4.dev";
|
2024-09-07 07:24:37 +00:00
|
|
|
UNIX_SOCKET_PERMISSION = "660";
|
2024-08-11 10:13:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
service = {
|
|
|
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
|
|
|
|
};
|
2024-08-27 09:08:53 +00:00
|
|
|
|
|
|
|
repository = {
|
|
|
|
DISABLE_STARS = true;
|
|
|
|
DEFAULT_BRANCH = "master";
|
|
|
|
};
|
2024-08-11 10:13:36 +00:00
|
|
|
};
|
|
|
|
};
|
2024-08-31 02:15:09 +00:00
|
|
|
|
|
|
|
services.caddy.settings.apps.http.servers.srv0.routes = lib.singleton {
|
2024-09-20 17:38:01 +00:00
|
|
|
match = lib.singleton { host = [ "git.ny4.dev" ]; };
|
2024-08-31 02:15:09 +00:00
|
|
|
handle = lib.singleton {
|
|
|
|
handler = "reverse_proxy";
|
|
|
|
upstreams = [ { dial = "unix//run/forgejo/forgejo.sock"; } ];
|
|
|
|
};
|
|
|
|
};
|
2024-08-11 10:13:36 +00:00
|
|
|
}
|