Forgejo Setup

This commit is contained in:
Shawn Borton 2026-09-10 15:29:11 -05:00
parent a4db9c8516
commit c9914bf62e
3 changed files with 266 additions and 7 deletions

View file

@ -0,0 +1,50 @@
{
config,
lib,
pkgs,
...
}:
let
domain = "git.onionpatch.cloud";
acmeEmail = "shawn@shawnborton.info";
secretsDir = "/etc/forgejo/secrets";
dockerJobImage = "docker://catthehacker/ubuntu:runner-latest";
in
{
services.forgejo = {
enable = true;
user = "forgejo";
group = "forgejo";
database.type = "postgres";
repositoryRoot = "/mnt/forgejo/repositories";
settings = {
server = {
# DISABLE_SSH = true;
DOMAIN = domain;
ROOT_URL = "https://${domain}/";
# HTTP_ADDR = "127.0.0.1";
HTTP_ADDR = "0.0.0.0";
# HTTP_PORT = 3000;
# PROTOCOL = "https";
SSH_PORT = 2112;
# SSH_PORT = lib.head config.services.openssh.ports;
};
service = {
DISABLE_REGISTRATION = false;
};
lfs = {
enable = true;
contentDir = "/mnt/forgejo/lfs";
};
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
};
};
}