2024-05-11 01:09:43 +02:00
|
|
|
{ lib, config, ... }:
|
|
|
|
let
|
|
|
|
port = 8419;
|
|
|
|
host = "git.moonythm.dev";
|
2024-05-11 01:18:47 +02:00
|
|
|
cfg = config.services.forgejo;
|
2024-05-11 01:09:43 +02:00
|
|
|
in
|
|
|
|
{
|
2024-05-11 01:22:34 +02:00
|
|
|
sops.secrets.forgejo_mail_password = {
|
|
|
|
sopsFile = ../secrets.yaml;
|
|
|
|
owner = cfg.user;
|
|
|
|
group = cfg.group;
|
|
|
|
};
|
|
|
|
|
2024-05-11 01:09:43 +02:00
|
|
|
satellite.cloudflared.targets.${host}.port = port;
|
|
|
|
|
|
|
|
services.forgejo = {
|
|
|
|
enable = true;
|
|
|
|
appName = "moonforge";
|
|
|
|
stateDir = "/persist/state/var/lib/forgejo";
|
|
|
|
mailerPasswordFile = config.sops.secrets.forgejo_mail_password.path;
|
|
|
|
|
|
|
|
dump = {
|
|
|
|
enable = true;
|
|
|
|
type = "tar.gz";
|
|
|
|
};
|
|
|
|
|
|
|
|
lfs.enable = true;
|
|
|
|
|
|
|
|
# See [the cheatsheet](https://docs.gitea.com/next/administration/config-cheat-sheet)
|
|
|
|
settings = {
|
|
|
|
session.COOKIE_SECURE = true;
|
|
|
|
server = {
|
|
|
|
DOMAIN = host;
|
|
|
|
HTTP_PORT = port;
|
|
|
|
ROOT_URL = "https://${host}";
|
|
|
|
LANDING_PAGE = "prescientmoon"; # Make my profile the landing page
|
|
|
|
};
|
|
|
|
|
|
|
|
cron.ENABLED = true;
|
|
|
|
# service.DISABLE_REGISTRATION = true;
|
|
|
|
|
|
|
|
mailer = {
|
|
|
|
ENABLED = true;
|
|
|
|
SMTP_PORT = 465;
|
|
|
|
SMTP_ADDR = "smtp.migadu.com";
|
2024-05-11 01:33:02 +02:00
|
|
|
USER = "git@orbit.moonythm.dev";
|
2024-05-11 01:09:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
repository = {
|
|
|
|
DISABLE_STARS = true;
|
|
|
|
DISABLED_REPO_UNITS = "";
|
|
|
|
DEFAULT_REPO_UNITS = lib.strings.concatStringsSep "," [
|
|
|
|
"repo.code"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|