41 lines
775 B
Nix
41 lines
775 B
Nix
{ config, ... }:
|
|
let
|
|
inherit (config.networking) fqdn;
|
|
|
|
acmeEnabled = config.acme.enable;
|
|
in
|
|
{
|
|
services.gitea = {
|
|
enable = true;
|
|
|
|
appName = "TuxCord Gitea";
|
|
database.type = "mysql";
|
|
|
|
lfs.enable = true;
|
|
|
|
settings = {
|
|
server = {
|
|
DOMAIN = fqdn;
|
|
ROOT_URL = "${if acmeEnabled then "https" else "http"}://${fqdn}/";
|
|
HTTP_PORT = 3000;
|
|
};
|
|
|
|
service = {
|
|
DISABLE_REGISTRATION = true;
|
|
REQUIRE_SIGNIN_VIEW = false;
|
|
};
|
|
|
|
repository = {
|
|
ENABLE_PUSH_CREATE_USER = true;
|
|
ENABLE_PUSH_CREATE_ORG = true;
|
|
DEFAULT_BRANCH = "main";
|
|
};
|
|
|
|
# ui.DEFAULT_THEME = "...";
|
|
|
|
# TODO: once we have email setup this would be nice
|
|
mailer.ENABLED = true;
|
|
};
|
|
};
|
|
}
|